From 9f006a29402743da4f100e0dd5df0df6d1e53d65 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Wed, 12 Oct 2022 11:06:59 +0200 Subject: [PATCH] Fixing navigation to session details + layout in session overview screen --- .../devices/v2/overview/SessionOverviewFragment.kt | 7 +++++++ vector/src/main/res/layout/fragment_session_overview.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt index 7510880087..8159ac0a2e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt @@ -177,6 +177,7 @@ class SessionOverviewFragment : override fun invalidate() = withState(viewModel) { state -> updateToolbar(state) + updateEntryDetails(state.deviceId) updateSessionInfo(state) updateLoading(state.isLoading) updatePushNotificationToggle(state.deviceId, state.pushers.invoke().orEmpty()) @@ -197,6 +198,12 @@ class SessionOverviewFragment : } } + private fun updateEntryDetails(deviceId: String) { + views.sessionOverviewEntryDetails.setOnClickListener { + viewNavigator.goToSessionDetails(requireContext(), deviceId) + } + } + private fun updateSessionInfo(viewState: SessionOverviewViewState) { if (viewState.deviceInfo is Success) { views.sessionOverviewInfo.isVisible = true diff --git a/vector/src/main/res/layout/fragment_session_overview.xml b/vector/src/main/res/layout/fragment_session_overview.xml index 80ad744d01..1c59abfd12 100644 --- a/vector/src/main/res/layout/fragment_session_overview.xml +++ b/vector/src/main/res/layout/fragment_session_overview.xml @@ -51,7 +51,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/sessionOverviewEntryDetails" + app:layout_constraintTop_toBottomOf="@id/sessionOverviewPushNotifications" app:layout_constraintWidth="wrap_content" />