forked from mirrors/linphone-iphone
Merge branch 'master'
This commit is contained in:
commit
965ae0e35a
3 changed files with 4 additions and 7 deletions
|
|
@ -41,9 +41,7 @@ final class ContactsManager: ObservableObject {
|
|||
|
||||
private var friendListSuscription: AnyCancellable?
|
||||
|
||||
private init() {
|
||||
fetchContacts()
|
||||
}
|
||||
private init() {}
|
||||
|
||||
func fetchContacts() {
|
||||
coreContext.doOnCoreQueue { core in
|
||||
|
|
|
|||
|
|
@ -247,8 +247,6 @@ final class CoreContext: ObservableObject {
|
|||
.sink { _ in
|
||||
self.mCore.iterate()
|
||||
}
|
||||
|
||||
try? self.mCore.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +257,7 @@ final class CoreContext: ObservableObject {
|
|||
}
|
||||
|
||||
func onEnterForeground() {
|
||||
coreQueue.async {
|
||||
coreQueue.sync {
|
||||
// We can't rely on defaultAccount?.params?.isPublishEnabled
|
||||
// as it will be modified by the SDK when changing the presence status
|
||||
|
||||
|
|
@ -270,7 +268,7 @@ final class CoreContext: ObservableObject {
|
|||
}
|
||||
|
||||
func onEnterBackground() {
|
||||
coreQueue.async {
|
||||
coreQueue.sync {
|
||||
// We can't rely on defaultAccount?.params?.isPublishEnabled
|
||||
// as it will be modified by the SDK when changing the presence status
|
||||
Log.info("App is in background, un-PUBLISHING presence info")
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ struct LinphoneApp: App {
|
|||
if newPhase == .active {
|
||||
Log.info("Entering foreground")
|
||||
coreContext.onEnterForeground()
|
||||
ContactsManager.shared.fetchContacts()
|
||||
} else if newPhase == .inactive {
|
||||
} else if newPhase == .background {
|
||||
Log.info("Entering background")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue