From 679f0a5940a7d02277dde9e7bd1547f942c343d5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 1 Oct 2021 15:03:23 +0200 Subject: [PATCH] Ensure initial sync progress dialog is hidden when the initial sync is over --- changelog.d/983.bugfix | 1 + .../java/im/vector/app/features/home/HomeActivity.kt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelog.d/983.bugfix diff --git a/changelog.d/983.bugfix b/changelog.d/983.bugfix new file mode 100644 index 0000000000..7318f7f4cd --- /dev/null +++ b/changelog.d/983.bugfix @@ -0,0 +1 @@ +Ensure initial sync progress dialog is hidden when the initial sync is over \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index 1513431196..ce93e9c1fa 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -313,10 +313,7 @@ class HomeActivity : private fun renderState(state: HomeActivityViewState) { when (val status = state.syncStatusServiceStatus) { - is SyncStatusService.Status.Idle -> { - views.waitingView.root.isVisible = false - } - is SyncStatusService.Status.Progressing -> { + is SyncStatusService.Status.Progressing -> { val initSyncStepStr = initSyncStepFormatter.format(status.initSyncStep) Timber.v("$initSyncStepStr ${status.percentProgress}") views.waitingView.root.setOnClickListener { @@ -334,7 +331,10 @@ class HomeActivity : } views.waitingView.root.isVisible = true } - else -> Unit + else -> { + // Idle or Incremental sync status + views.waitingView.root.isVisible = false + } }.exhaustive }