LithApp / Lith

Multiplatform, mobile-focused WeeChat relay client
https://lith.app
GNU General Public License v2.0
80 stars 7 forks source link

Fix deadlock if DBus notifications service is not registered #143

Closed chinese-soup closed 1 year ago

chinese-soup commented 1 year ago

Hi, I found out about this thanks to Spotify still having this bug in 2023, so I thought "hmm, how about I try Lith" - when you have no notification daemon running, the app freezes including the UI, until a notification daemon is available (or a timeout runs out, which is in the order of minutes IIRC, dont quote me on that).

Hence why I'm checking if a deamon is registered in dbus first. If it isn't, use the old trayicon notification. (Dunno what to do about the "code duplication" of this part, though).

Tested by killing (and subsequently reopening) the dunst daemon I use and then highlighting myself. The fallback worked correctly, as did the Dbus again once dunst was running again.

MartinBriza commented 1 year ago

Nice fix, thanks pal