mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Make sure newly added account is marked as default in side menu
This commit is contained in:
parent
5a1487a691
commit
6b11e37b14
2 changed files with 2 additions and 3 deletions
|
|
@ -120,6 +120,7 @@ class AccountModel @WorkerThread constructor(
|
|||
account.addListener(accountListener)
|
||||
coreContext.core.addListener(coreListener)
|
||||
|
||||
isDefault.postValue(false)
|
||||
presenceStatus.postValue(ConsolidatedPresence.Offline)
|
||||
showMwi.postValue(false)
|
||||
voicemailCount.postValue("")
|
||||
|
|
|
|||
|
|
@ -82,9 +82,7 @@ class DrawerMenuViewModel @UiThread constructor() : GenericViewModel() {
|
|||
"$TAG Account [${account.params.identityAddress?.asStringUriOnly()}] has been set as default"
|
||||
)
|
||||
for (model in accounts.value.orEmpty()) {
|
||||
if (model.account != account) {
|
||||
model.isDefault.postValue(false)
|
||||
}
|
||||
model.isDefault.postValue(model.account == account)
|
||||
}
|
||||
defaultAccountChangedEvent.postValue(
|
||||
Event(account.params.identityAddress?.asStringUriOnly() ?: "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue