summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-26 07:06:21 -0700
committerFuwn <[email protected]>2025-06-26 07:06:21 -0700
commit25f104b0f2271380cb589b07feb553894fe51c71 (patch)
tree789360a294852392491ce8fb09475ec34e8362a7
parentfeat: Development commit (diff)
downloadsora-testing-25f104b0f2271380cb589b07feb553894fe51c71.tar.xz
sora-testing-25f104b0f2271380cb589b07feb553894fe51c71.zip
feat: Development commit
-rw-r--r--Sora/Views/Generic/GenericListView.swift8
1 files changed, 3 insertions, 5 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift
index d8203b1..b0ee422 100644
--- a/Sora/Views/Generic/GenericListView.swift
+++ b/Sora/Views/Generic/GenericListView.swift
@@ -35,7 +35,7 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
return true
}
- if selectedFolder == uncategorisedUUID {
+ if selectedFolder == UUID.nilUUID() {
return item.folder == nil
}
@@ -74,8 +74,6 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
}
}
- private let uncategorisedUUID = UUID(uuidString: "00000000-0000-0000-0000-000000000000")!
-
@ViewBuilder private var listContent: some View {
List {
if filteredItems.isEmpty && (!searchText.isEmpty || !(selectedFolder == nil)) {
@@ -122,7 +120,7 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
Text("All").tag(nil as UUID?)
if items.contains(where: { $0.folder == nil }) {
- Text("Uncategorised").tag(uncategorisedUUID as UUID?)
+ Text("Uncategorised").tag(UUID.nilUUID() as UUID?)
}
ForEach(settings.folders, id: \.id) { folder in
@@ -205,7 +203,7 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
Text("All").tag(nil as UUID?)
if items.contains(where: { $0.folder == nil }) {
- Text("Uncategorised").tag(uncategorisedUUID)
+ Text("Uncategorised").tag(UUID.nilUUID())
}
ForEach(settings.folders, id: \.id) { folder in