ios: register notification token/mode on app start (#761)

* ios: register notification token/mode on app start

* refactor

* register token on start

* update model on main thread
This commit is contained in:
Evgeny Poberezkin
2022-07-01 09:49:30 +01:00
committed by GitHub
parent b2c455c301
commit 815981487b
8 changed files with 93 additions and 83 deletions

View File

@@ -29,8 +29,9 @@ final class ChatModel: ObservableObject {
@Published var userSMPServers: [String]?
@Published var appOpenUrl: URL?
@Published var deviceToken: DeviceToken?
@Published var tokenStatus = NtfTknStatus.new
@Published var notificationMode = NotificationMode.off
@Published var savedToken: DeviceToken?
@Published var tokenStatus: NtfTknStatus?
@Published var notificationMode = NotificationsMode.off
@Published var notificationPreview: NotificationPreviewMode? = .message
// current WebRTC call
@Published var callInvitations: Dictionary<ChatId, CallInvitation> = [:]