fix: show sync loading during commit sync

Keep the header sync button busy while commit & sync finishes
Avoid showing pending push counts during the sync step
This commit is contained in:
Bohdan Triapitsyn
2026-05-06 00:49:32 +03:00
parent cce782a62b
commit 89f0e0a0e6
@@ -1057,6 +1057,7 @@ export const GitView: React.FC = () => {
await refreshStatusAndBranches();
if (options.pushAfter) {
setSyncAction('sync');
const trackingRemoteName = status?.tracking?.split('/')[0];
const syncRemote = effectiveRemotes.find((remote) => remote.name === trackingRemoteName) ?? effectiveRemotes[0];
if (!syncRemote) {
@@ -1119,6 +1120,9 @@ export const GitView: React.FC = () => {
toast.error(message);
} finally {
setCommitAction(null);
if (options.pushAfter) {
setSyncAction(null);
}
}
};