mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 01:52:44 +02:00
Show bottom sheet in user other sessions
This commit is contained in:
+4
-12
@@ -101,20 +101,16 @@ class UserSessionOverviewViewModel: UserSessionOverviewViewModelType, UserSessio
|
||||
|
||||
extension UserSessionOverviewViewState {
|
||||
var bottomSheetTitle: String {
|
||||
cardViewData.verificationState.bottomSheetTitle(isSessionActive: nil)
|
||||
cardViewData.verificationState.bottomSheetTitle
|
||||
}
|
||||
|
||||
var bottomSheetDescription: String {
|
||||
cardViewData.verificationState.bottomSheetDescription(isSessionActive: nil)
|
||||
cardViewData.verificationState.bottomSheetDescription
|
||||
}
|
||||
}
|
||||
|
||||
private extension UserSessionInfo.VerificationState {
|
||||
func bottomSheetTitle(isSessionActive: Bool? = nil) -> String {
|
||||
guard isSessionActive != false else {
|
||||
return VectorL10n.userSessionInactiveSessionTitle
|
||||
}
|
||||
|
||||
var bottomSheetTitle: String {
|
||||
switch self {
|
||||
case .unverified:
|
||||
return VectorL10n.userSessionUnverifiedSessionTitle
|
||||
@@ -125,11 +121,7 @@ private extension UserSessionInfo.VerificationState {
|
||||
}
|
||||
}
|
||||
|
||||
func bottomSheetDescription(isSessionActive: Bool?) -> String {
|
||||
guard isSessionActive != false else {
|
||||
return VectorL10n.userSessionInactiveSessionDescription
|
||||
}
|
||||
|
||||
var bottomSheetDescription: String {
|
||||
switch self {
|
||||
case .unverified:
|
||||
return VectorL10n.userSessionUnverifiedSessionDescription
|
||||
|
||||
@@ -85,7 +85,7 @@ struct UserSessionOverview: View {
|
||||
.bottomSheet(isPresented: $viewModel.showBottomSheet) {
|
||||
InfoView(title: viewModel.viewState.bottomSheetTitle,
|
||||
descripion: viewModel.viewState.bottomSheetDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { $viewModel.showBottomSheet.wrappedValue = false }))
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { viewModel.showBottomSheet = false }))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user