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
10 changes: 1 addition & 9 deletions CodeEdit/Features/CodeEditUI/Views/ToolbarBranchPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct ToolbarBranchPicker: View {
}
.task {
await self.sourceControlManager?.refreshCurrentBranch()
await self.sourceControlManager?.refreshBranches()
}
}

Expand Down Expand Up @@ -159,9 +160,6 @@ struct ToolbarBranchPicker: View {
.padding(.top, 10)
.padding(5)
.frame(width: 340)
.task {
await sourceControlManager.refreshBranches()
}
}

func headerLabel(_ title: String) -> some View {
Expand Down Expand Up @@ -193,9 +191,6 @@ struct ToolbarBranchPicker: View {
self.title = title
}

@Environment(\.dismiss)
private var dismiss

var body: some View {
Button {
switchBranch()
Expand All @@ -215,9 +210,6 @@ struct ToolbarBranchPicker: View {
Task {
do {
try await sourceControlManager.checkoutBranch(branch: branch)
await MainActor.run {
dismiss()
}
} catch {
await sourceControlManager.showAlertForError(title: "Failed to checkout", error: error)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ struct SourceControlNavigatorHistoryView: View {
}
}
}
.onReceive(sourceControlManager.$currentBranch) { _ in
Task {
await updateCommitHistory()
}
}
.task {
await updateCommitHistory()
}
Expand Down