save is_attention session state

This commit is contained in:
yggverse 2024-11-11 16:53:06 +02:00
parent 8917d14908
commit 57cdc4cee9
4 changed files with 21 additions and 13 deletions

View file

@ -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);