From da70d520bc66d7db585910837ec2936137991935 Mon Sep 17 00:00:00 2001 From: Nikita Fedrunov <66663241+fedrunov@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:49:44 +0200 Subject: [PATCH] fixed space switching dialog measured with wrong height sometimes (#6928) --- changelog.d/6750.wip | 1 + .../java/im/vector/app/features/spaces/SpaceListFragment.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/6750.wip diff --git a/changelog.d/6750.wip b/changelog.d/6750.wip new file mode 100644 index 0000000000..2e18110c97 --- /dev/null +++ b/changelog.d/6750.wip @@ -0,0 +1 @@ +[App Layout] fixed space switching dialog measured with wrong height sometimes diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt index 9d67e3d713..ca22ac30a1 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListFragment.kt @@ -193,7 +193,10 @@ class SpaceListFragment : override fun invalidate() = withState(viewModel) { state -> when (state.asyncSpaces) { Uninitialized, - is Loading -> views.stateView.state = StateView.State.Loading + is Loading -> { + views.stateView.state = StateView.State.Loading + return@withState + } is Success -> views.stateView.state = StateView.State.Content else -> Unit }