Remove core.removeAccount from the main queue

This commit is contained in:
Benoit Martins 2024-04-23 16:07:05 +02:00
parent 16c386dcc8
commit 582c1b1d66
2 changed files with 18 additions and 15 deletions

View file

@ -169,21 +169,6 @@ final class CoreContext: ObservableObject {
self.loggedIn = false
ToastViewModel.shared.toastMessage = "Registration failed"
ToastViewModel.shared.displayToast = true
self.monitor.pathUpdateHandler = { path in
if path.status == .satisfied {
if cbVal.state != .Ok && cbVal.state != .Progress {
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()
}
}
}
}
})

View file

@ -0,0 +1,18 @@
//
// ParticipantsListFragment.swift
// Linphone
//
// Created by Benoît Martins on 23/04/2024.
//
import SwiftUI
struct ParticipantsListFragment: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
#Preview {
ParticipantsListFragment()
}