mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-06 07:29:10 +00:00
Fixed loading indicator state not update when network is not available
This commit is contained in:
@@ -60,11 +60,11 @@ class CircularLetterViewModel(application: Application) : AndroidViewModel(appli
|
|||||||
AppDatabase.getInstance(getApplication()).circularDao()
|
AppDatabase.getInstance(getApplication()).circularDao()
|
||||||
.insertAll(newCirculars)
|
.insertAll(newCirculars)
|
||||||
}
|
}
|
||||||
circularsUpdated.postValue(true)
|
|
||||||
} catch (exception: IOException) {
|
} catch (exception: IOException) {
|
||||||
showMessage.postValue(true)
|
showMessage.postValue(true)
|
||||||
} finally {
|
} finally {
|
||||||
isNotUpdating = true
|
isNotUpdating = true
|
||||||
|
circularsUpdated.postValue(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start()
|
}.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user