diff options
Diffstat (limited to 'Sora/Views')
| -rw-r--r-- | Sora/Views/ContentView.swift | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Sora/Views/ContentView.swift b/Sora/Views/ContentView.swift index 4758828..a88fa1b 100644 --- a/Sora/Views/ContentView.swift +++ b/Sora/Views/ContentView.swift @@ -13,12 +13,14 @@ struct ContentView: View { .sorted { $0.state.createdAt > $1.state.createdAt } } + var history: [UUID: BooruSearchQuery] { + Dictionary(uniqueKeysWithValues: manager.searchHistory.map { ($0.id, $0) }) + } + var body: some View { #if os(macOS) NavigationSplitView(columnVisibility: $columnVisibility) { List(selection: $viewStateSelection) { - let history = Dictionary(uniqueKeysWithValues: manager.searchHistory.map { ($0.id, $0) }) - if viewStates.isEmpty { Text("No Tags") .tag(UUID.nilUUID()) |