Fix toolbar menu position inconsistency on legacy iOS

This commit is contained in:
世界
2025-12-04 15:56:02 +08:00
parent ada4232f54
commit 3239b1e822
2 changed files with 6 additions and 2 deletions
@@ -28,7 +28,7 @@ public struct ConnectionListView: View {
} }
#if !os(tvOS) #if !os(tvOS)
.toolbar { .toolbar {
ToolbarItem { ToolbarItemGroup(placement: .topBarTrailing) {
Menu { Menu {
Picker("State", selection: $viewModel.connectionStateFilter) { Picker("State", selection: $viewModel.connectionStateFilter) {
ForEach(ConnectionStateFilter.allCases) { state in ForEach(ConnectionStateFilter.allCases) { state in
@@ -48,6 +48,10 @@ public struct ConnectionListView: View {
} label: { } label: {
Label("Filter", systemImage: "line.3.horizontal.circle") Label("Filter", systemImage: "line.3.horizontal.circle")
} }
if #available(iOS 26.0, *), !Variant.debugNoIOS26 {
} else {
StartStopButton()
}
} }
} }
#endif #endif
@@ -258,7 +258,7 @@ import SwiftUI
StartStopButton() StartStopButton()
#else #else
if #available(iOS 26.0, *), !Variant.debugNoIOS26 { if #available(iOS 26.0, *), !Variant.debugNoIOS26 {
} else { } else if !useLegacyTabView || coordinator.selection != .connections {
StartStopButton() StartStopButton()
} }
#endif #endif