mirror of
https://github.com/openlibrecommunity/olcng.git
synced 2026-07-03 14:05:17 +02:00
fix(viewmodel): reload server list when cache is empty before update
This commit is contained in:
@@ -266,6 +266,9 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
||||
updateListAction.value = -1
|
||||
|
||||
viewModelScope.launch(Dispatchers.Default) {
|
||||
if (serversCache.isEmpty()) {
|
||||
withContext(Dispatchers.Main) { reloadServerList() }
|
||||
}
|
||||
if (serversCache.isEmpty()) {
|
||||
return@launch
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user