Adding click listeners on verify button
This commit is contained in:
parent
81beccdd8e
commit
5759a0f7da
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ class SessionInfoView @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
val viewDetailsButton = views.sessionInfoViewDetailsButton
|
||||
val viewVerifyButton = views.sessionInfoVerifySessionButton
|
||||
|
||||
fun render(
|
||||
sessionInfoViewState: SessionInfoViewState,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue