mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
save is_attention session state
This commit is contained in:
parent
8917d14908
commit
57cdc4cee9
4 changed files with 21 additions and 13 deletions
|
|
@ -37,7 +37,7 @@ impl Item {
|
|||
options: (Option<i32>, Option<String>, bool, bool, bool, bool),
|
||||
) -> Self {
|
||||
// Get item options from tuple
|
||||
let (position, request, is_pinned, is_selected, _is_attention, is_load) = options;
|
||||
let (position, request, is_pinned, is_selected, is_attention, is_load) = options;
|
||||
|
||||
// Generate unique ID for new page components
|
||||
let id = uuid_string_random();
|
||||
|
|
@ -59,8 +59,7 @@ impl Item {
|
|||
page.widget().gobject(),
|
||||
None,
|
||||
position,
|
||||
is_pinned,
|
||||
is_selected,
|
||||
(is_pinned, is_selected, is_attention),
|
||||
));
|
||||
|
||||
// Init events
|
||||
|
|
@ -155,7 +154,7 @@ impl Item {
|
|||
None,
|
||||
record.is_pinned,
|
||||
record.is_selected,
|
||||
false,
|
||||
record.is_attention,
|
||||
false,
|
||||
),
|
||||
));
|
||||
|
|
@ -181,6 +180,7 @@ impl Item {
|
|||
page_position: &i32,
|
||||
is_pinned: &bool,
|
||||
is_selected: &bool,
|
||||
is_attention: &bool,
|
||||
) -> Result<(), String> {
|
||||
match Database::add(
|
||||
transaction,
|
||||
|
|
@ -188,6 +188,7 @@ impl Item {
|
|||
page_position,
|
||||
is_pinned,
|
||||
is_selected,
|
||||
is_attention,
|
||||
) {
|
||||
Ok(_) => {
|
||||
let id = Database::last_insert_id(transaction);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue