mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Adding click listeners on verify button
This commit is contained in:
parent
81beccdd8e
commit
5759a0f7da
3 changed files with 11 additions and 0 deletions
|
@ -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 a new issue