Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 5 additions & 9 deletions Muxy/Views/MainWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct MainWindow: View {
VCSTabView(state: state, focused: false, onFocus: {})
.frame(width: vcsPanelWidth)
}
} else if fileTreePanelVisible, VCSDisplayMode.current == .attached, let treeState = activeFileTreeState {
} else if fileTreePanelVisible, let treeState = activeFileTreeState {
HStack(spacing: 0) {
sidePanelResizeHandle { delta in
let next = fileTreePanelWidth - Double(delta)
Expand Down Expand Up @@ -398,12 +398,10 @@ struct MainWindow: View {
FileDiffIconButton {
openVCS(for: project)
}
if VCSDisplayMode.current == .attached {
FileTreeIconButton {
NotificationCenter.default.post(name: .toggleFileTree, object: nil)
}
.help("File Tree (\(KeyBindingStore.shared.combo(for: .toggleFileTree).displayString))")
FileTreeIconButton {
NotificationCenter.default.post(name: .toggleFileTree, object: nil)
}
.help("File Tree (\(KeyBindingStore.shared.combo(for: .toggleFileTree).displayString))")
}
}
.padding(.trailing, 4)
Expand Down Expand Up @@ -598,9 +596,7 @@ struct MainWindow: View {
}

private func toggleFileTreePanel() {
guard VCSDisplayMode.current == .attached,
let project = activeProject
else {
guard let project = activeProject else {
fileTreePanelVisible = false
return
}
Expand Down
2 changes: 1 addition & 1 deletion Muxy/Views/Settings/AppearanceSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ struct AppearanceSettingsView: View {
@State private var themeService = ThemeService.shared
@State private var showThemePicker = false
@State private var currentTheme: String?
@AppStorage("muxy.vcsDisplayMode") private var vcsDisplayMode = VCSDisplayMode.tab.rawValue
@AppStorage("muxy.vcsDisplayMode") private var vcsDisplayMode = VCSDisplayMode.attached.rawValue

var body: some View {
SettingsContainer {
Expand Down
8 changes: 3 additions & 5 deletions Muxy/Views/Workspace/TabStrip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ struct PaneTabStrip: View {
if showVCSButton {
FileDiffIconButton(action: onCreateVCSTab)
.help(shortcutTooltip("Source Control", for: .openVCSTab))
if VCSDisplayMode.current == .attached {
FileTreeIconButton {
NotificationCenter.default.post(name: .toggleFileTree, object: nil)
}
.help(shortcutTooltip("File Tree", for: .toggleFileTree))
FileTreeIconButton {
NotificationCenter.default.post(name: .toggleFileTree, object: nil)
}
.help(shortcutTooltip("File Tree", for: .toggleFileTree))
}
}
.padding(.trailing, 4)
Expand Down
Loading