From 59d2430e2f9e189c4810805ae6740ce06db5ae61 Mon Sep 17 00:00:00 2001 From: jeffser Date: Sun, 26 May 2024 14:29:45 -0600 Subject: [PATCH] Tweak to notifications --- src/window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window.py b/src/window.py index 674eef1..43aa8ee 100644 --- a/src/window.py +++ b/src/window.py @@ -260,8 +260,8 @@ class AlpacaWindow(Adw.ApplicationWindow): ) overlay.add_toast(toast) - def show_notification(self, title:str, body:str, only_when_focus:bool, icon:Gio.ThemedIcon=None): - if only_when_focus==False or self.is_active()==False: + def show_notification(self, title:str, body:str, only_when_unfocus:bool, icon:Gio.ThemedIcon=None): + if not only_when_unfocus or (only_when_unfocus and self.is_active()==False): notification = Gio.Notification.new(title) notification.set_body(body) if icon: notification.set_icon(icon)