mirror of
https://github.com/markqvist/Sideband.git
synced 2025-06-22 05:34:06 -04:00
Catch OS notification limit exceptions
This commit is contained in:
parent
63030a6f48
commit
88f427b97c
1 changed files with 9 additions and 6 deletions
|
@ -993,13 +993,16 @@ class SidebandCore():
|
||||||
notifications_permitted = True
|
notifications_permitted = True
|
||||||
|
|
||||||
if notifications_permitted:
|
if notifications_permitted:
|
||||||
if RNS.vendor.platformutils.get_platform() == "android":
|
try:
|
||||||
if self.is_service:
|
if RNS.vendor.platformutils.get_platform() == "android":
|
||||||
self.owner_service.android_notification(title, content, group=group, context_id=context_id)
|
if self.is_service:
|
||||||
|
self.owner_service.android_notification(title, content, group=group, context_id=context_id)
|
||||||
|
else:
|
||||||
|
plyer.notification.notify(title, content, notification_icon=self.notification_icon, context_override=None)
|
||||||
else:
|
else:
|
||||||
plyer.notification.notify(title, content, notification_icon=self.notification_icon, context_override=None)
|
plyer.notification.notify(title, content, app_icon=self.icon_32)
|
||||||
else:
|
except Exception as e:
|
||||||
plyer.notification.notify(title, content, app_icon=self.icon_32)
|
RNS.log("An error occurred while posting a notification to the operating system: {e}", RNS.LOG_ERROR)
|
||||||
|
|
||||||
def log_announce(self, dest, app_data, dest_type, stamp_cost=None, link_stats=None):
|
def log_announce(self, dest, app_data, dest_type, stamp_cost=None, link_stats=None):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue