You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a scenario where a program is sending out notifications with the same ID each time.
It seems like the hooks depend on ID. When I try to hook into a notification (2) after a hook has been established for a prior notification (1) with the same ID, the hook does not take effect for (2). It would be nice to have a method to change the ID. I would just modify the ID manually, but I don't know all of where it's used.
I'm using a variant of your dotfile notification popup code in case I'm missing something obvious there:
constNotificationAnimated=(notification)=>{constinner=Widget.Revealer({transition: "slide_left",transition_duration: 200,child: NotificationTest(notification),});constouter=Widget.Revealer({transition: "slide_left",transition_duration: 200,child: inner,});letbox=Widget.Box({hpack: "end",child: outer,});//Setup initial animationUtils.idle(()=>{outer.revealChild=true;Utils.timeout(200,()=>{inner.revealChild=true;});});box=Object.assign(box,{dismiss(){Utils.timeout(200,()=>{inner.revealChild=false;Utils.timeout(200,()=>{outer.revealChild=false;box.destroy();});});},});constremove=()=>{//Don't dismiss if popup is trueprint("Got here");print(notification.id);if(notification.popup){return;}print("Dismissing");box.dismiss();};box.hook(notification,remove,"dismissed").hook(notification,remove,"closed");returnbox;};
The text was updated successfully, but these errors were encountered:
//Workaround for notifications with same ID?Utils.timeout(Notifications.popupTimeout+1000,()=>{notification.dismiss();});
This allows the earlier notifications to dismiss, but it doesn't fix everything. The popup timeout still uses sends the 'dismiss()' event to the first notification with the ID. That causes the most recent notification to get dismissed before it's time.
Hi, I have a scenario where a program is sending out notifications with the same ID each time.
It seems like the hooks depend on ID. When I try to hook into a notification (2) after a hook has been established for a prior notification (1) with the same ID, the hook does not take effect for (2). It would be nice to have a method to change the ID. I would just modify the ID manually, but I don't know all of where it's used.
I'm using a variant of your dotfile notification popup code in case I'm missing something obvious there:
The text was updated successfully, but these errors were encountered: