ios: Multiuser calls (#1800)

* ios: Multiuser calls

* counter update on badge

* padding before profile info in call view

* underline in name

* change after merge

* do not show Simplex Info button if users already created

* unread counter

* do not increase badge counter when chat has disabled notifications

* update incoming call

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
Stanislav Dmitrenko
2023-01-23 13:20:58 +00:00
committed by GitHub
co-authored by Evgeny Poberezkin
parent bcc80be8e9
commit 4cd396a0d2
12 changed files with 66 additions and 68 deletions
+3 -3
View File
@@ -928,7 +928,7 @@ func startChat() throws {
m.users = try listUsers()
if justStarted {
try getUserChatData()
NtfManager.shared.setNtfBadgeCount(m.totalUnreadCount())
NtfManager.shared.setNtfBadgeCount(m.totalUnreadCountForAllUsers())
try refreshCallInvitations()
(m.savedToken, m.tokenStatus, m.notificationMode) = apiGetNtfToken()
if let token = m.deviceToken {
@@ -1077,7 +1077,7 @@ func processReceivedMsg(_ res: ChatResponse) async {
}
case let .newChatItem(user, aChatItem):
if !active(user) {
if case .rcvNew = aChatItem.chatItem.meta.itemStatus {
if case .rcvNew = aChatItem.chatItem.meta.itemStatus, aChatItem.chatInfo.ntfsEnabled {
m.increaseUnreadCounter(user: user)
}
return
@@ -1125,7 +1125,7 @@ func processReceivedMsg(_ res: ChatResponse) async {
}
case let .chatItemDeleted(user, deletedChatItem, toChatItem, _):
if !active(user) {
if toChatItem == nil && deletedChatItem.chatItem.isRcvNew {
if toChatItem == nil && deletedChatItem.chatItem.isRcvNew && deletedChatItem.chatInfo.ntfsEnabled {
m.decreaseUnreadCounter(user: user)
}
return