summaryrefslogtreecommitdiff
path: root/Sora/Views/PlatformSpecificToolbarItem.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-15 01:19:33 -0700
committerFuwn <[email protected]>2025-06-15 01:19:33 -0700
commit11e6e0ec638bfe18c7c973dcdd44b4eefe8b0d79 (patch)
tree53b7944e8c2b78a891e8815536c149c667d4334f /Sora/Views/PlatformSpecificToolbarItem.swift
parentfeat: Development commit (diff)
downloadsora-testing-11e6e0ec638bfe18c7c973dcdd44b4eefe8b0d79.tar.xz
sora-testing-11e6e0ec638bfe18c7c973dcdd44b4eefe8b0d79.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/PlatformSpecificToolbarItem.swift')
-rw-r--r--Sora/Views/PlatformSpecificToolbarItem.swift8
1 files changed, 6 insertions, 2 deletions
diff --git a/Sora/Views/PlatformSpecificToolbarItem.swift b/Sora/Views/PlatformSpecificToolbarItem.swift
index 4a44db0..578affe 100644
--- a/Sora/Views/PlatformSpecificToolbarItem.swift
+++ b/Sora/Views/PlatformSpecificToolbarItem.swift
@@ -5,13 +5,17 @@ struct PlatformSpecificToolbarItem<Content: View>: ToolbarContent {
let content: () -> Content
init(
- placement: ToolbarItemPlacement?,
+ placement: ToolbarItemPlacement? = nil,
@ViewBuilder content: @escaping () -> Content
) {
#if os(macOS)
self.placement = .automatic
#else
- self.placement = placement ?? .bottomBar
+ if #available(iOS 26, *) {
+ self.placement = placement ?? .secondaryAction
+ } else {
+ self.placement = placement ?? .bottomBar
+ }
#endif
self.content = content