mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-26 23:55:53 +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
@@ -96,7 +96,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.0")
|
||||
implementation("com.github.Dansoftowner:jSystemThemeDetector:3.8")
|
||||
implementation("com.sshtools:two-slices:0.9.3")
|
||||
implementation("com.sshtools:two-slices:0.9.0-SNAPSHOT")
|
||||
implementation("org.slf4j:slf4j-simple:2.0.12")
|
||||
implementation("uk.co.caprica:vlcj:4.8.2")
|
||||
implementation("com.github.NanoHttpd.nanohttpd:nanohttpd:efb2ebf85a")
|
||||
|
||||
@@ -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