ags: sync

This commit is contained in:
end-4
2024-02-05 13:20:00 +07:00
parent 14368314e5
commit 73c8454c1c
61 changed files with 1327 additions and 1220 deletions
@@ -365,6 +365,7 @@ export default () => MarginRevealer({
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
child = null;
}
return;
}
@@ -10,12 +10,14 @@ export default () => Box({
attribute: {
'map': new Map(),
'dismiss': (box, id, force = false) => {
if (!id || !box.attribute.map.has(id) || box.attribute.map.get(id).attribute.hovered && !force)
if (!id || !box.attribute.map.has(id))
return;
const notifWidget = box.attribute.map.get(id);
if (notifWidget == null || notifWidget.attribute.hovered && !force)
return; // cuz already destroyed
const notif = box.attribute.map.get(id);
notif.revealChild = false;
notif.attribute.destroyWithAnims();
notifWidget.revealChild = false;
notifWidget.attribute.destroyWithAnims();
box.attribute.map.delete(id);
},
'notify': (box, id) => {
@@ -32,8 +34,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