mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Merged element 1.11.3 into bum
This commit is contained in:
+9
-6
@@ -24,6 +24,7 @@ struct UserOtherSessionsToolbar: ToolbarContent {
|
||||
@Binding var isShowLocationEnabled: Bool
|
||||
let allItemsSelected: Bool
|
||||
let sessionCount: Int
|
||||
let showDeviceLogout: Bool
|
||||
let onToggleSelection: () -> Void
|
||||
let onSignOut: () -> Void
|
||||
|
||||
@@ -87,12 +88,14 @@ struct UserOtherSessionsToolbar: ToolbarContent {
|
||||
private func optionsMenu() -> some View {
|
||||
Button { } label: {
|
||||
Menu {
|
||||
Button {
|
||||
isEditModeEnabled = true
|
||||
} label: {
|
||||
Label(VectorL10n.userOtherSessionMenuSelectSessions, systemImage: "checkmark.circle")
|
||||
if showDeviceLogout { // As you can only sign out the selected sessions, we don't allow selection when you're unable to sign out devices.
|
||||
Button {
|
||||
isEditModeEnabled = true
|
||||
} label: {
|
||||
Label(VectorL10n.userOtherSessionMenuSelectSessions, systemImage: "checkmark.circle")
|
||||
}
|
||||
.disabled(sessionCount == 0)
|
||||
}
|
||||
.disabled(sessionCount == 0)
|
||||
|
||||
if BWIBuildSettings.shared.deviceManagerShowIPAddress {
|
||||
Button {
|
||||
@@ -102,7 +105,7 @@ struct UserOtherSessionsToolbar: ToolbarContent {
|
||||
}
|
||||
}
|
||||
|
||||
if sessionCount > 0 {
|
||||
if sessionCount > 0, showDeviceLogout {
|
||||
DestructiveButton {
|
||||
onSignOut()
|
||||
} label: {
|
||||
|
||||
Reference in New Issue
Block a user