timeout(), close_in_app_notification()

This commit is contained in:
Abhiraj Roy (iconized)
2024-04-25 16:12:58 +05:30
committed by GitHub
parent d9746d8567
commit 4dca72f959

View File

@@ -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