Merged element 1.11.3 into bum

This commit is contained in:
Arnfried Griesert
2023-09-29 05:24:53 +02:00
36 changed files with 452 additions and 180 deletions
@@ -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: {