forked from mirrors/linphone-iphone
Compare commits
No commits in common. "fix/force_voip_and_remote_push_account_settings" and "master" have entirely different histories.
fix/force_
...
master
1 changed files with 1 additions and 15 deletions
|
|
@ -182,10 +182,6 @@ final class CoreContext: ObservableObject {
|
|||
self.shortcuts = shortcuts
|
||||
}
|
||||
}
|
||||
|
||||
for acc in self.mCore.accountList {
|
||||
self.forceRemotePushToMatchVoipPushSettings(account: acc)
|
||||
}
|
||||
|
||||
self.mCoreDelegate = CoreDelegateStub(onGlobalStateChanged: { (core: Core, state: GlobalState, _: String) in
|
||||
if state == GlobalState.On {
|
||||
|
|
@ -342,9 +338,7 @@ final class CoreContext: ObservableObject {
|
|||
|
||||
}
|
||||
}
|
||||
}, onAccountAdded: { (_: Core, acc: Account) in
|
||||
self.forceRemotePushToMatchVoipPushSettings(account: acc)
|
||||
|
||||
}, onAccountAdded: { (_: Core, _: Account) in
|
||||
var accountModels: [AccountModel] = []
|
||||
for account in self.mCore.accountList {
|
||||
accountModels.append(AccountModel(account: account, core: self.mCore))
|
||||
|
|
@ -428,14 +422,6 @@ final class CoreContext: ObservableObject {
|
|||
mCore.removeDelegate(delegate: delegate)
|
||||
}
|
||||
|
||||
func forceRemotePushToMatchVoipPushSettings(account: Account) {
|
||||
if let params = account.params, params.pushNotificationAllowed && !params.remotePushNotificationAllowed {
|
||||
Log.warn("account \(account.displayName()): VOIP and REMOTE push setting mismatch, force \(params.pushNotificationAllowed ? "enabling" : "disabling") of REMOTE Push")
|
||||
let newParams = params.clone()
|
||||
newParams?.remotePushNotificationAllowed = params.pushNotificationAllowed
|
||||
account.params = newParams
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:enable line_length
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue