Skip to content

Commit

Permalink
Fix notification not showing on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly committed Sep 11, 2024
1 parent 66593c7 commit d14c44b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lnxlink/modules/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ def __init__(self, lnxlink):
self.name = "Notify"
self.lnxlink = lnxlink
self._requirements()
self.notify = self.lib["notify"].DBusNotification(
appname="LNXlink", callback=self.callback_action
)
self.notify = None

def _requirements(self):
self.lib = {
Expand Down Expand Up @@ -63,7 +61,11 @@ def start_control(self, topic, data):
"critical": 2,
}

# notify2
# Send notification
if self.notify is None:
self.notify = self.lib["notify"].DBusNotification(
appname="LNXlink", callback=self.callback_action
)
notification_id = self.notify.send(
title=data["title"],
message=data["message"],
Expand Down

0 comments on commit d14c44b

Please sign in to comment.