mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-08 08:44:32 +00:00
desktop: show toast if failed to show notification (#3955)
* desktop: show toast if failed to show notification * longer timeout * returned old version of the lib
This commit is contained in:
committed by
GitHub
parent
1d698c114f
commit
96fb61ccfc
@@ -211,6 +211,7 @@
|
||||
<string name="notification_preview_new_message">new message</string>
|
||||
<string name="notification_new_contact_request">New contact request</string>
|
||||
<string name="notification_contact_connected">Connected</string>
|
||||
<string name="error_showing_desktop_notification">Error showing notification, contact developers.</string>
|
||||
|
||||
<!-- local authentication notice - SimpleXAPI.kt -->
|
||||
<string name="la_notice_title_simplex_lock">SimpleX Lock</string>
|
||||
|
||||
+5
-1
@@ -111,8 +111,12 @@ object NtfManager {
|
||||
}
|
||||
try {
|
||||
prevNtfs.add(chatId to builder.toast())
|
||||
} catch (e: Exception) {
|
||||
} catch (e: Throwable) {
|
||||
Log.e(TAG, e.stackTraceToString())
|
||||
if (e !is Exception) {
|
||||
val text = e.stackTraceToString().lines().getOrNull(0) ?: ""
|
||||
showToast(generalGetString(MR.strings.error_showing_desktop_notification) + " " + text, 4_000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user