diff --git a/app/src/main/kotlin/com/wire/android/ui/settings/devices/SelfDevicesViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/settings/devices/SelfDevicesViewModel.kt index c1ee370724c..c90e3295374 100644 --- a/app/src/main/kotlin/com/wire/android/ui/settings/devices/SelfDevicesViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/settings/devices/SelfDevicesViewModel.kt @@ -59,12 +59,18 @@ class SelfDevicesViewModel @Inject constructor( private val observeUserE2eiCertificates = refreshE2eiCertificates.map { getUserE2eiCertificates(currentAccountId) } init { - fetchAndObserveClientList() + observeClientList() + updateSelfClientsListFromRemote() } - private fun fetchAndObserveClientList() { + private fun updateSelfClientsListFromRemote() { + viewModelScope.launch { + fetchSelfClientsFromRemote() + } + } + + private fun observeClientList() { viewModelScope.launch { - fetchSelfClientsFromRemote() // this will cause the list to be refreshed observeClientList(currentAccountId) .combine(observeUserE2eiCertificates, ::Pair) .collect { (result, e2eiCertificates) ->