mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Set publishEnabled to false by default in app extension, and enable it on main app
This commit is contained in:
parent
c0916af3ce
commit
cba7621413
2 changed files with 15 additions and 0 deletions
|
|
@ -306,6 +306,14 @@ class CoreContext: ObservableObject {
|
|||
NotificationCenter.default.post(name: NSNotification.Name("CoreStarted"), object: nil)
|
||||
}
|
||||
ContactsManager.shared.fetchContacts()
|
||||
|
||||
if let defaultAccountParams = self.mCore.defaultAccount?.params, defaultAccountParams.publishEnabled == false {
|
||||
let params = defaultAccountParams
|
||||
let clonedParams = params.clone()
|
||||
clonedParams?.publishEnabled = true
|
||||
self.mCore.defaultAccount?.params = clonedParams
|
||||
}
|
||||
|
||||
if self.mCore.consolidatedPresence != ConsolidatedPresence.Online {
|
||||
self.updatePresence(core: self.mCore, presence: ConsolidatedPresence.Online)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,13 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
createCore()
|
||||
// if !lc!.config!.getBool(section: "app", key: "disable_chat_feature", defaultValue: false) {
|
||||
Log.info("received push payload : \(bestAttemptContent.userInfo.debugDescription)")
|
||||
|
||||
if let defaultAccountParams = lc?.defaultAccount?.params, defaultAccountParams.publishEnabled == true {
|
||||
let params = defaultAccountParams
|
||||
let clonedParams = params.clone()
|
||||
clonedParams?.publishEnabled = false
|
||||
lc?.defaultAccount?.params = clonedParams
|
||||
}
|
||||
|
||||
/*
|
||||
let defaults = UserDefaults.init(suiteName: Config.appGroupName)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue