diff options
| author | Fuwn <[email protected]> | 2025-06-14 09:23:45 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-14 09:23:45 -0700 |
| commit | ef218d199c7288672d1c6daf1f22ea3113aa79c5 (patch) | |
| tree | d97a3515a3ee6ff7ad19199f4d03ed570a856285 | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-ef218d199c7288672d1c6daf1f22ea3113aa79c5.tar.xz sora-testing-ef218d199c7288672d1c6daf1f22ea3113aa79c5.zip | |
feat: Development commit
| -rw-r--r-- | Sora/Views/Generic/GenericListView.swift | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift index ec02ce3..0193471 100644 --- a/Sora/Views/Generic/GenericListView.swift +++ b/Sora/Views/Generic/GenericListView.swift @@ -1,6 +1,6 @@ import SwiftUI -struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { +struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swiftlint:disable:this type_body_length @EnvironmentObject private var settings: SettingsManager @EnvironmentObject private var manager: BooruManager @Binding var selectedTab: Int @@ -81,6 +81,20 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { ) } else { if !settings.folders.isEmpty && !allowBookmarking { + Picker("Sort", selection: $sort) { + ForEach(SettingsBookmarkSort.allCases, id: \.rawValue) { sortMode in + Text(sortMode.rawValue).tag(sortMode) + } + } + #if os(macOS) + .padding() + .pickerStyle(.menu) + #else + .padding(.horizontal) + .pickerStyle(.palette) + .padding(.bottom) + #endif + Picker("Collection", selection: $selectedFolder) { Text("All").tag(nil as UUID?) @@ -92,23 +106,12 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { Text(folder.name).tag(folder.id) } } - .pickerStyle(.menu) - #if os(macOS) - .padding() - #else - .padding(.horizontal) - #endif - - Picker("Sort", selection: $sort) { - ForEach(SettingsBookmarkSort.allCases, id: \.rawValue) { sortMode in - Text(sortMode.rawValue).tag(sortMode) - } - } - .pickerStyle(.menu) + .padding(.bottom) + .padding(.horizontal) #if os(macOS) - .padding() + .pickerStyle(.menu) #else - .padding(.horizontal) + .pickerStyle(NavigationLinkPickerStyle()) #endif } |