ios: do not show notifications on update events in inactive profiles (#1959)
This commit is contained in:
parent
d5f6b76ec5
commit
f6f3d17383
@ -1270,11 +1270,8 @@ func chatItemSimpleUpdate(_ user: User, _ aChatItem: AChatItem) {
|
|||||||
let m = ChatModel.shared
|
let m = ChatModel.shared
|
||||||
let cInfo = aChatItem.chatInfo
|
let cInfo = aChatItem.chatInfo
|
||||||
let cItem = aChatItem.chatItem
|
let cItem = aChatItem.chatItem
|
||||||
let notify = { NtfManager.shared.notifyMessageReceived(user, cInfo, cItem) }
|
if active(user) && m.upsertChatItem(cInfo, cItem) {
|
||||||
if !active(user) {
|
NtfManager.shared.notifyMessageReceived(user, cInfo, cItem)
|
||||||
notify()
|
|
||||||
} else if m.upsertChatItem(cInfo, cItem) {
|
|
||||||
notify()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user