withdraw old notifications

This commit is contained in:
Martin Wagner 2022-03-16 22:44:34 +01:00
parent 13d27b15fa
commit ddbd490de4

View File

@ -3735,6 +3735,8 @@ class MainWindow(Gtk.ApplicationWindow):
elif (cover_binary:=self._client.get_cover_binary(song["file"])) is not None: elif (cover_binary:=self._client.get_cover_binary(song["file"])) is not None:
notify.set_icon(Gio.BytesIcon.new(GLib.Bytes.new(cover_binary))) notify.set_icon(Gio.BytesIcon.new(GLib.Bytes.new(cover_binary)))
self.get_application().send_notification("title-change", notify) self.get_application().send_notification("title-change", notify)
else:
self.get_application().withdraw_notification("title-change")
else: else:
self.set_title("mpdevil") self.set_title("mpdevil")
if self._use_csd: if self._use_csd: