mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Add the initial implementation for managing spaces. (#4963)
This isn't hooked up into the flows yet.
This commit is contained in:
@@ -39,6 +39,28 @@ extension View {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder func backportButtonStyleGlass() -> some View {
|
||||
if #available(iOS 26, *) {
|
||||
buttonStyle(.glass)
|
||||
} else {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder func backportButtonStyleGlassProminent() -> some View {
|
||||
if #available(iOS 26, *) {
|
||||
// `.glassProminent` breaks our preview tests so we need to disable it when running tests.
|
||||
// https://github.com/pointfreeco/swift-snapshot-testing/issues/1029#issuecomment-3366942138
|
||||
if ProcessInfo.isRunningTests {
|
||||
self
|
||||
} else {
|
||||
buttonStyle(.glassProminent)
|
||||
}
|
||||
} else {
|
||||
buttonStyle(.borderedProminent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ToolbarContent {
|
||||
|
||||
Reference in New Issue
Block a user