mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 04:36:58 +02:00
Add intrinsic sized bottom sheet
This commit is contained in:
@@ -126,7 +126,7 @@ final class UserSessionsFlowCoordinator: NSObject, Coordinator, Presentable {
|
||||
self.showLogoutConfirmation(for: [sessionInfo])
|
||||
}
|
||||
case let .showSessionStateInfo(sessionInfo):
|
||||
self.showInfoSheet(parameters: .init(userSessionInfo: sessionInfo))
|
||||
self.showInfoSheet(parameters: .init(userSessionInfo: sessionInfo, parentSize: self.toPresentable().view.bounds.size))
|
||||
}
|
||||
}
|
||||
pushScreen(with: coordinator)
|
||||
@@ -167,7 +167,7 @@ final class UserSessionsFlowCoordinator: NSObject, Coordinator, Presentable {
|
||||
case let .logoutFromUserSessions(sessionInfos: sessionInfos):
|
||||
self.showLogoutConfirmation(for: sessionInfos)
|
||||
case let .showSessionStateByFilter(filter):
|
||||
self.showInfoSheet(parameters: .init(filter: filter))
|
||||
self.showInfoSheet(parameters: .init(filter: filter, parentSize: self.toPresentable().view.bounds.size))
|
||||
}
|
||||
}
|
||||
pushScreen(with: coordinator)
|
||||
@@ -447,16 +447,18 @@ extension UserSessionsFlowCoordinator: UIAdaptivePresentationControllerDelegate
|
||||
// MARK: Private
|
||||
|
||||
private extension InfoSheetCoordinatorParameters {
|
||||
init(userSessionInfo: UserSessionInfo) {
|
||||
init(userSessionInfo: UserSessionInfo, parentSize: CGSize) {
|
||||
self.init(title: userSessionInfo.bottomSheetTitle,
|
||||
description: userSessionInfo.bottomSheetDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { }))
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { }),
|
||||
parentSize: parentSize)
|
||||
}
|
||||
|
||||
init(filter: UserOtherSessionsFilter) {
|
||||
init(filter: UserOtherSessionsFilter, parentSize: CGSize) {
|
||||
self.init(title: filter.bottomSheetTitle,
|
||||
description: filter.bottomSheetDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { }))
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { }),
|
||||
parentSize: parentSize)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -61,7 +61,8 @@ final class UserSessionNameCoordinator: NSObject, Coordinator, Presentable {
|
||||
case .learnMore:
|
||||
self.showInfoSheet(parameters: .init(title: VectorL10n.userSessionRenameSessionTitle,
|
||||
description: VectorL10n.userSessionRenameSessionDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: {})))
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: {}),
|
||||
parentSize: self.toPresentable().view.bounds.size))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user