mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
ios: show notifications for different users (#1874)
* ios: show notifications for different users * refactore * terminate background taks on chat item update * refactor * refactor2 * refactor3 * refactor 4 * refactor5 * fix chat item update in Android --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c55a7692c5
commit
bcca27bfdb
@@ -1441,8 +1441,11 @@ open class ChatController(var ctrl: ChatCtrl?, val ntfManager: NtfManager, val a
|
||||
private suspend fun chatItemSimpleUpdate(user: User, aChatItem: AChatItem) {
|
||||
val cInfo = aChatItem.chatInfo
|
||||
val cItem = aChatItem.chatItem
|
||||
if (!active(user) || chatModel.upsertChatItem(cInfo, cItem)) {
|
||||
ntfManager.notifyMessageReceived(chatModel.currentUser.value!!, cInfo, cItem)
|
||||
val notify = { ntfManager.notifyMessageReceived(user, cInfo, cItem) }
|
||||
if (!active(user)) {
|
||||
notify()
|
||||
} else if (chatModel.upsertChatItem(cInfo, cItem)) {
|
||||
notify()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user