FIX SPAMMING NOTIF ERRORS FINALLY OMGGGGGGGGGG (btw #215)

This commit is contained in:
end-4
2024-02-03 07:20:44 +07:00
parent 13f634fffa
commit fb86c7316c
3 changed files with 33 additions and 13 deletions
@@ -32,8 +32,6 @@ export default () => Box({
box.attribute.map.set(id, newNotif);
box.pack_end(box.attribute.map.get(id), false, false, 0);
box.show_all();
// box.children = Array.from(box.attribute.map.values()).reverse();
},
},
setup: (self) => self
@@ -85,7 +85,8 @@ export default (props) => {
self.toggleClassName('notif-listaction-btn-enabled', Notifications.dnd);
});
const clearButton = ListActionButton('clear_all', 'Clear', () => {
notificationList.get_children().forEach(ch => ch.destroy());
// Manual destruction is not necessary
// since Notifications.clear() sends destroy signals to every notif
Notifications.clear();
});
const listTitle = Box({