Skip to content
Open
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
5 changes: 4 additions & 1 deletion CodeEdit/WorkspaceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ struct WorkspaceView: View {
// MARK: - Source Control

.task {
// Only refresh git data if source control is enabled
guard sourceControlIsEnabled else { return }

do {
try await sourceControlManager.refreshRemotes()
try await sourceControlManager.refreshStashEntries()
Expand All @@ -95,7 +98,7 @@ struct WorkspaceView: View {
)
}
}
.onChange(of: sourceControlIsEnabled) { newValue in
.onChange(of: sourceControlIsEnabled) { _, newValue in
if newValue {
Task {
await sourceControlManager.refreshCurrentBranch()
Expand Down