Using viewState value to check if it is current session

This commit is contained in:
Maxime NATUREL 2022-09-19 11:23:11 +02:00
parent aa7f7d7111
commit 72637b465f
1 changed files with 2 additions and 3 deletions

View File

@ -87,11 +87,10 @@ class SessionOverviewViewModel @AssistedInject constructor(
} }
private fun handleVerifySessionAction() = withState { viewState -> private fun handleVerifySessionAction() = withState { viewState ->
val deviceId = viewState.deviceId if (viewState.isCurrentSession) {
if (isCurrentSession(deviceId)) {
handleVerifyCurrentSession() handleVerifyCurrentSession()
} else { } else {
handleVerifyOtherSession(deviceId) handleVerifyOtherSession(viewState.deviceId)
} }
} }