From 4dca72f95903de36e29220f28e97deeade19bdcc Mon Sep 17 00:00:00 2001 From: "Abhiraj Roy (iconized)" <157954129+iconized@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:12:58 +0530 Subject: [PATCH] timeout(), close_in_app_notification() --- blackbox/Functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blackbox/Functions.py b/blackbox/Functions.py index cdb65d3..4504cd1 100644 --- a/blackbox/Functions.py +++ b/blackbox/Functions.py @@ -1931,3 +1931,12 @@ def show_in_app_notification(self, message, err): ) self.notification_revealer.set_reveal_child(True) self.timeout_id = GLib.timeout_add(3000, timeout, self) + +def timeout(self): + close_in_app_notification(self) + + +def close_in_app_notification(self): + self.notification_revealer.set_reveal_child(False) + GLib.source_remove(self.timeout_id) + self.timeout_id = None