forked from mirrors/linphone-iphone
Check internet connection before deleting accounts
This commit is contained in:
parent
f99f1c6d32
commit
16c386dcc8
2 changed files with 12 additions and 8 deletions
|
|
@ -193,14 +193,19 @@ final class CoreContext: ObservableObject {
|
|||
self.updatePresence(core: self.mCore, presence: ConsolidatedPresence.Online)
|
||||
}
|
||||
} else if cbVal.state != .Ok && cbVal.state != .Progress { // If registration failed, remove account from core
|
||||
let params = cbVal.account.params
|
||||
let clonedParams = params?.clone()
|
||||
clonedParams?.registerEnabled = false
|
||||
cbVal.account.params = clonedParams
|
||||
|
||||
cbVal.core.removeAccount(account: cbVal.account)
|
||||
cbVal.core.clearAccounts()
|
||||
cbVal.core.clearAllAuthInfo()
|
||||
self.monitor.pathUpdateHandler = { path in
|
||||
if path.status == .satisfied {
|
||||
let params = cbVal.account.params
|
||||
let clonedParams = params?.clone()
|
||||
clonedParams?.registerEnabled = false
|
||||
cbVal.account.params = clonedParams
|
||||
|
||||
cbVal.core.removeAccount(account: cbVal.account)
|
||||
cbVal.core.clearAccounts()
|
||||
cbVal.core.clearAllAuthInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
TelecomManager.shared.onAccountRegistrationStateChanged(core: cbVal.core, account: cbVal.account, state: cbVal.state, message: cbVal.message)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -752,7 +752,6 @@ struct CallView: View {
|
|||
.clipped()
|
||||
}
|
||||
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Spacer()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue