summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-14 09:52:14 -0700
committerFuwn <[email protected]>2025-06-14 09:52:14 -0700
commitadeb4708e95960eeefd9544136330901e482b7ee (patch)
tree4d55a8cf9c884ddf93059093e0bbf1897997261c
parentfeat: Development commit (diff)
downloadsora-testing-adeb4708e95960eeefd9544136330901e482b7ee.tar.xz
sora-testing-adeb4708e95960eeefd9544136330901e482b7ee.zip
feat: Development commit
-rw-r--r--Sora/Views/Generic/GenericListView.swift19
1 files changed, 13 insertions, 6 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift
index 8fd768b..6a82678 100644
--- a/Sora/Views/Generic/GenericListView.swift
+++ b/Sora/Views/Generic/GenericListView.swift
@@ -168,19 +168,26 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
Label("Collection", systemImage: "folder")
}
.popover(isPresented: $isCollectionPickerPresented) {
- Picker("Collection", selection: $selectedFolder) {
- Text("All").tag(nil as UUID?)
+ List {
+ Button("All") {
+ selectedFolder = nil
+ isCollectionPickerPresented = false
+ }
if items.contains(where: { $0.folder == nil }) {
- Text("Uncategorised").tag(uncategorisedUUID as UUID?)
+ Button("Uncategorised") {
+ selectedFolder = uncategorisedUUID
+ isCollectionPickerPresented = false
+ }
}
ForEach(settings.folders, id: \.id) { folder in
- Text(folder.name).tag(folder.id)
+ Button(folder.name) {
+ selectedFolder = folder.id
+ isCollectionPickerPresented = false
+ }
}
}
- .pickerStyle(.inline)
- .padding()
}
}
}