forked from Shinonome/dots-hyprland
re-add notif force dismissal (#215)
This commit is contained in:
@@ -435,17 +435,17 @@ export default ({
|
|||||||
})
|
})
|
||||||
widget.add(notificationBox);
|
widget.add(notificationBox);
|
||||||
wholeThing.child.children = [widget];
|
wholeThing.child.children = [widget];
|
||||||
// if (isPopup) Utils.timeout(popupTimeout, () => {
|
if (isPopup) Utils.timeout(popupTimeout, () => {
|
||||||
// if (wholeThing) {
|
if (wholeThing) {
|
||||||
// wholeThing.revealChild = false;
|
wholeThing.revealChild = false;
|
||||||
// Utils.timeout(200, () => {
|
Utils.timeout(200, () => {
|
||||||
// if (wholeThing) {
|
if (wholeThing) {
|
||||||
// wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
// wholeThing = null;
|
wholeThing = null;
|
||||||
// }
|
}
|
||||||
// command();
|
command();
|
||||||
// }, wholeThing);
|
}, wholeThing);
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
return wholeThing;
|
return wholeThing;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ export default () => Box({
|
|||||||
attribute: {
|
attribute: {
|
||||||
'map': new Map(),
|
'map': new Map(),
|
||||||
'dismiss': (box, id, force = false) => {
|
'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;
|
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);
|
notifWidget.revealChild = false;
|
||||||
notif.revealChild = false;
|
notifWidget.attribute.destroyWithAnims();
|
||||||
notif.attribute.destroyWithAnims();
|
|
||||||
box.attribute.map.delete(id);
|
box.attribute.map.delete(id);
|
||||||
},
|
},
|
||||||
'notify': (box, id) => {
|
'notify': (box, id) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user