mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Fixing navigation to session details + layout in session overview screen
This commit is contained in:
parent
def67b2e7d
commit
9f006a2940
2 changed files with 8 additions and 1 deletions
|
@ -177,6 +177,7 @@ class SessionOverviewFragment :
|
||||||
|
|
||||||
override fun invalidate() = withState(viewModel) { state ->
|
override fun invalidate() = withState(viewModel) { state ->
|
||||||
updateToolbar(state)
|
updateToolbar(state)
|
||||||
|
updateEntryDetails(state.deviceId)
|
||||||
updateSessionInfo(state)
|
updateSessionInfo(state)
|
||||||
updateLoading(state.isLoading)
|
updateLoading(state.isLoading)
|
||||||
updatePushNotificationToggle(state.deviceId, state.pushers.invoke().orEmpty())
|
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) {
|
private fun updateSessionInfo(viewState: SessionOverviewViewState) {
|
||||||
if (viewState.deviceInfo is Success) {
|
if (viewState.deviceInfo is Success) {
|
||||||
views.sessionOverviewInfo.isVisible = true
|
views.sessionOverviewInfo.isVisible = true
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0"
|
app:layout_constraintHorizontal_bias="0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/sessionOverviewEntryDetails"
|
app:layout_constraintTop_toBottomOf="@id/sessionOverviewPushNotifications"
|
||||||
app:layout_constraintWidth="wrap_content" />
|
app:layout_constraintWidth="wrap_content" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
Loading…
Reference in a new issue