mirror of
https://github.com/Snigdha-OS/snigdhaos-blackbox.git
synced 2025-09-21 20:15:02 +02:00
timeout(), close_in_app_notification()
This commit is contained in:

committed by
GitHub

parent
d9746d8567
commit
4dca72f959
@@ -1931,3 +1931,12 @@ def show_in_app_notification(self, message, err):
|
|||||||
)
|
)
|
||||||
self.notification_revealer.set_reveal_child(True)
|
self.notification_revealer.set_reveal_child(True)
|
||||||
self.timeout_id = GLib.timeout_add(3000, timeout, self)
|
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
|
||||||
|
Reference in New Issue
Block a user