commit a1dc03c9584de9fb8ac2751338ad96c3392f8ebc
parent f69f08c4edcbcc75d50abf65f69df95f63c8337b
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Fri, 3 Jan 2025 01:08:56 +0100
fix(core/notifications): resume coroutine
Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt
@@ -486,13 +486,12 @@ class Notifications : Feature("Notifications") {
context.coroutineScope.launch(coroutineDispatcher) {
suspendCoroutine { continuation ->
conversationManager.fetchMessageByServerId(conversationId, serverMessageId.toLong(), onSuccess = {
+ continuation.resumeWith(Result.success(Unit))
if (it.senderId.toString() == context.database.myUserId) {
- continuation.resumeWith(Result.success(Unit))
param.invokeOriginal()
return@fetchMessageByServerId
}
context.coroutineScope.launch(coroutineDispatcher) {
- continuation.resumeWith(Result.success(Unit))
onMessageReceived(notificationData, notificationType, it)
}
}, onError = {