diff options
| author | Fuwn <[email protected]> | 2025-06-26 07:06:21 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-26 07:06:21 -0700 |
| commit | 25f104b0f2271380cb589b07feb553894fe51c71 (patch) | |
| tree | 789360a294852392491ce8fb09475ec34e8362a7 | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-25f104b0f2271380cb589b07feb553894fe51c71.tar.xz sora-testing-25f104b0f2271380cb589b07feb553894fe51c71.zip | |
feat: Development commit
| -rw-r--r-- | Sora/Views/Generic/GenericListView.swift | 8 |
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 |