mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Merge pull request #4132 from vector-im/feature/bma/init_sync_dialog
Ensure initial sync progress dialog is hidden when the initial sync is over
This commit is contained in:
commit
8d7f542e88
2 changed files with 6 additions and 5 deletions
1
changelog.d/983.bugfix
Normal file
1
changelog.d/983.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Ensure initial sync progress dialog is hidden when the initial sync is over
|
|
@ -313,10 +313,7 @@ class HomeActivity :
|
||||||
|
|
||||||
private fun renderState(state: HomeActivityViewState) {
|
private fun renderState(state: HomeActivityViewState) {
|
||||||
when (val status = state.syncStatusServiceStatus) {
|
when (val status = state.syncStatusServiceStatus) {
|
||||||
is SyncStatusService.Status.Idle -> {
|
is SyncStatusService.Status.Progressing -> {
|
||||||
views.waitingView.root.isVisible = false
|
|
||||||
}
|
|
||||||
is SyncStatusService.Status.Progressing -> {
|
|
||||||
val initSyncStepStr = initSyncStepFormatter.format(status.initSyncStep)
|
val initSyncStepStr = initSyncStepFormatter.format(status.initSyncStep)
|
||||||
Timber.v("$initSyncStepStr ${status.percentProgress}")
|
Timber.v("$initSyncStepStr ${status.percentProgress}")
|
||||||
views.waitingView.root.setOnClickListener {
|
views.waitingView.root.setOnClickListener {
|
||||||
|
@ -334,7 +331,10 @@ class HomeActivity :
|
||||||
}
|
}
|
||||||
views.waitingView.root.isVisible = true
|
views.waitingView.root.isVisible = true
|
||||||
}
|
}
|
||||||
else -> Unit
|
else -> {
|
||||||
|
// Idle or Incremental sync status
|
||||||
|
views.waitingView.root.isVisible = false
|
||||||
|
}
|
||||||
}.exhaustive
|
}.exhaustive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue