Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Sources/Loci/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ struct LociShell: View {
isShowingCommandPalette = true
}
}
.onReceive(NotificationCenter.default.publisher(for: .lociToggleNotebookInspector)) { _ in
// ChatWorkspaceView owns this toggle while Ask Loci is open;
// from every other filter it has no listener, so enter the
// workspace the same way the sidebar row does.
guard store.selectedFilter != .chat else { return }
UserDefaults.standard.set(true, forKey: "LociNotebookInspectorVisible")
var transaction = Transaction()
transaction.animation = nil
transaction.disablesAnimations = true
withTransaction(transaction) {
store.selectedFilter = .chat
}
}
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.20) {
store.warmCommonReferenceFilters()
Expand Down