Open muhchaudhary opened 3 months ago
cant reproduce, are you sure you are not calling dismiss yourself somewhere?
This is what I did and it works as expected
import Notifd from "gi://AstalNotifd"
import GLib from "gi://GLib"
const notifd = new Notifd.Notifd
notifd.connect("notified", (_, id) => {
print("notifd", notifd.get_notification(id).summary)
})
notifd.connect("resolved", (_, id) => {
print("resolved", id)
})
new GLib.MainLoop(null, false).run()
❯ astal-notifd -d
{"id":1,"time":1717343017,"expire_timeout":-1,"app_name":"notify-send","app_icon":"","summary":"hello world","body":"","actions":[],"hints":{"urgency":1,"sender-pid":507830}}
{"id":2,"time":1717343017,"expire_timeout":-1,"app_name":"notify-send","app_icon":"","summary":"hello world","body":"","actions":[],"hints":{"urgency":1,"sender-pid":507952}}
{"id":3,"time":1717343018,"expire_timeout":-1,"app_name":"notify-send","app_icon":"","summary":"hello world","body":"","actions":[],"hints":{"urgency":1,"sender-pid":508000}}
{"id":4,"time":1717343024,"expire_timeout":1000,"app_name":"notify-send","app_icon":"","summary":"hello world","body":"","actions":[],"hints":{"urgency":1,"sender-pid":508299}}
❯ gjs test.js
notifd hello world
notifd hello world
notifd hello world
notifd hello world
resolved 4
notify-send "hello world"
notify-send "hello world"
notify-send "hello world"
notify-send "hello world" -t 1000
I've noticed that when using AstalNotifd in proxy mode, dismissing/resolving any single notification will collectively send a resolved signal for all current notifications.
Steps to reproduce:
astal-notifd -d
)notify-send "Hello World"
followed bynotify-send "Hello World -t 1000"
)