@@ -326,29 +326,21 @@ public class Views.Today : Adw.Bin {
326326 signal_map[Services.Store.instance ().item_archived.connect (valid_delete_item )] = Services.Store.instance ();
327327 signal_map[Services.Store.instance ().item_unarchived.connect (valid_add_item )] = Services.Store.instance ();
328328
329- signal_map[Services.EventBus.get_default ().item_moved.connect ((item ) => {
330- // Handle existing items that may no longer belong in Today view
329+ signal_map[Services.EventBus.get_default ().item_moved.connect ((item , old_project_id , old_section_id , old_parent_id ) => {
331330 if (items. has_key (item. id)) {
332- if (Services . Store . instance (). valid_item_by_date (item, date, false )) {
333- items[item. id]. update_request ();
334- } else {
335- // Remove item that no longer belongs in today
331+ if (! Services . Store . instance (). valid_item_by_date (item, date, false )) {
336332 items[item. id]. hide_destroy ();
337333 items. unset (item. id);
338334 }
339335 }
340336
341337 if (overdue_items. has_key (item. id)) {
342- if (Services . Store . instance (). valid_item_by_overdue (item, date, false )) {
343- overdue_items[item. id]. update_request ();
344- } else {
345- // Remove item that no longer belongs in overdue
338+ if (! Services . Store . instance (). valid_item_by_overdue (item, date, false )) {
346339 overdue_items[item. id]. hide_destroy ();
347340 overdue_items. unset (item. id);
348341 }
349342 }
350343
351- // Check if item should be added to Today view (wasn't there before but should be now)
352344 if (! items. has_key (item. id) &&
353345 Services . Store . instance (). valid_item_by_date (item, date, false )) {
354346 add_item (item);
@@ -359,7 +351,6 @@ public class Views.Today : Adw.Bin {
359351 add_overdue_item (item);
360352 }
361353
362- // Update UI state
363354 update_headers ();
364355 check_placeholder ();
365356 listbox. invalidate_filter ();
@@ -542,7 +533,7 @@ public class Views.Today : Adw.Bin {
542533 overdue_listbox. invalidate_filter ();
543534 }
544535
545- private void valid_update_item (Objects .Item item ) {
536+ private void valid_update_item (Objects .Item item , string update_id ) {
546537 if (items. has_key (item. id)) {
547538 items[item. id]. update_request ();
548539 }
0 commit comments