mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Disable push notifications when pushNotificationAllowed is false
This commit is contained in:
parent
0dfdb5551c
commit
147682a0e5
2 changed files with 7 additions and 3 deletions
|
|
@ -146,7 +146,8 @@ class CoreContext: ObservableObject {
|
|||
self.mCore = try? Factory.Instance.createSharedCoreWithConfig(config: Config.get(), systemContext: Unmanaged.passUnretained(coreQueue).toOpaque(), appGroupId: Config.appGroupName, mainCore: true)
|
||||
|
||||
self.mCore.callkitEnabled = true
|
||||
self.mCore.pushNotificationEnabled = true
|
||||
|
||||
self.mCore.pushNotificationEnabled = self.mCore.defaultAccount?.params?.pushNotificationAllowed ?? false
|
||||
|
||||
let appName = Bundle.main.infoDictionary?["CFBundleName"] as? String
|
||||
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
|
|
|
|||
|
|
@ -107,8 +107,11 @@ class AccountLoginViewModel: ObservableObject {
|
|||
try accountParams.setServeraddress(newValue: address)
|
||||
// And we ensure the account will start the registration process
|
||||
accountParams.registerEnabled = true
|
||||
accountParams.pushNotificationAllowed = true
|
||||
accountParams.remotePushNotificationAllowed = true
|
||||
|
||||
if accountParams.pushNotificationAllowed {
|
||||
accountParams.pushNotificationAllowed = true
|
||||
accountParams.remotePushNotificationAllowed = true
|
||||
}
|
||||
#if DEBUG
|
||||
let pushEnvironment = ".dev"
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue