Adding click listeners on verify button

This commit is contained in:
Maxime NATUREL 2022-09-14 11:14:53 +02:00
parent 81beccdd8e
commit 5759a0f7da
3 changed files with 11 additions and 0 deletions

View file

@ -227,6 +227,9 @@ class VectorSettingsDevicesFragment :
views.deviceListCurrentSession.viewDetailsButton.debouncedClicks {
currentDeviceInfo.deviceInfo.deviceId?.let { deviceId -> navigateToSessionOverview(deviceId) }
}
views.deviceListCurrentSession.viewVerifyButton.debouncedClicks {
// TODO show bottom Sheet verification process
}
} ?: run {
hideCurrentSessionView()
}

View file

@ -49,6 +49,7 @@ class SessionInfoView @JvmOverloads constructor(
}
val viewDetailsButton = views.sessionInfoViewDetailsButton
val viewVerifyButton = views.sessionInfoVerifySessionButton
fun render(
sessionInfoViewState: SessionInfoViewState,

View file

@ -81,6 +81,7 @@ class SessionOverviewFragment :
override fun invalidate() = withState(viewModel) { state ->
updateToolbar(state.isCurrentSession)
updateVerifyButton()
updateEntryDetails(state.deviceId)
if (state.deviceInfo is Success) {
renderSessionInfo(state.isCurrentSession, state.deviceInfo.invoke())
@ -96,6 +97,12 @@ class SessionOverviewFragment :
?.setTitle(titleResId)
}
private fun updateVerifyButton() {
views.sessionOverviewInfo.viewVerifyButton.debouncedClicks {
// TODO show bottom Sheet verification process
}
}
private fun updateEntryDetails(deviceId: String) {
views.sessionOverviewEntryDetails.setOnClickListener {
viewNavigator.navigateToSessionDetails(requireContext(), deviceId)