Show bottom sheet in other sessions screen

This commit is contained in:
Alfonso Grillo
2022-10-28 15:50:35 +02:00
parent da07f67573
commit b5b6154a39
6 changed files with 54 additions and 40 deletions
@@ -61,6 +61,8 @@ class UserOtherSessionsViewModel: UserOtherSessionsViewModelType, UserOtherSessi
case .toggleAllSelection:
toggleAllSelection()
updateViewState()
case .viewSessionInfo:
completion?(.showSessionStateInfo(filter: state.bindings.filter))
}
}
@@ -168,32 +170,4 @@ private extension UserOtherSessionsFilter {
}
}
extension UserOtherSessionsViewState {
var bottomSheetTitle: String {
switch bindings.filter {
case .unverified:
return VectorL10n.userSessionUnverifiedSessionTitle
case .verified:
return VectorL10n.userSessionVerifiedSessionTitle
case .inactive:
return VectorL10n.userSessionInactiveSessionTitle
case .all:
return ""
}
}
var bottomSheetDescription: String {
switch bindings.filter {
case .unverified:
return VectorL10n.userSessionUnverifiedSessionDescription
case .verified:
return VectorL10n.userSessionVerifiedSessionDescription
case .inactive:
return VectorL10n.userSessionInactiveSessionDescription
case .all:
return ""
}
}
}