mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-04-30 06:34:29 +02:00
fix(core/notifications): resume coroutine
Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
parent
f69f08c4ed
commit
a1dc03c958
@ -486,13 +486,12 @@ class Notifications : Feature("Notifications") {
|
|||||||
context.coroutineScope.launch(coroutineDispatcher) {
|
context.coroutineScope.launch(coroutineDispatcher) {
|
||||||
suspendCoroutine { continuation ->
|
suspendCoroutine { continuation ->
|
||||||
conversationManager.fetchMessageByServerId(conversationId, serverMessageId.toLong(), onSuccess = {
|
conversationManager.fetchMessageByServerId(conversationId, serverMessageId.toLong(), onSuccess = {
|
||||||
|
continuation.resumeWith(Result.success(Unit))
|
||||||
if (it.senderId.toString() == context.database.myUserId) {
|
if (it.senderId.toString() == context.database.myUserId) {
|
||||||
continuation.resumeWith(Result.success(Unit))
|
|
||||||
param.invokeOriginal()
|
param.invokeOriginal()
|
||||||
return@fetchMessageByServerId
|
return@fetchMessageByServerId
|
||||||
}
|
}
|
||||||
context.coroutineScope.launch(coroutineDispatcher) {
|
context.coroutineScope.launch(coroutineDispatcher) {
|
||||||
continuation.resumeWith(Result.success(Unit))
|
|
||||||
onMessageReceived(notificationData, notificationType, it)
|
onMessageReceived(notificationData, notificationType, it)
|
||||||
}
|
}
|
||||||
}, onError = {
|
}, onError = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user