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:
@@ -1057,6 +1057,7 @@ export const GitView: React.FC = () => {
|
|||||||
await refreshStatusAndBranches();
|
await refreshStatusAndBranches();
|
||||||
|
|
||||||
if (options.pushAfter) {
|
if (options.pushAfter) {
|
||||||
|
setSyncAction('sync');
|
||||||
const trackingRemoteName = status?.tracking?.split('/')[0];
|
const trackingRemoteName = status?.tracking?.split('/')[0];
|
||||||
const syncRemote = effectiveRemotes.find((remote) => remote.name === trackingRemoteName) ?? effectiveRemotes[0];
|
const syncRemote = effectiveRemotes.find((remote) => remote.name === trackingRemoteName) ?? effectiveRemotes[0];
|
||||||
if (!syncRemote) {
|
if (!syncRemote) {
|
||||||
@@ -1119,6 +1120,9 @@ export const GitView: React.FC = () => {
|
|||||||
toast.error(message);
|
toast.error(message);
|
||||||
} finally {
|
} finally {
|
||||||
setCommitAction(null);
|
setCommitAction(null);
|
||||||
|
if (options.pushAfter) {
|
||||||
|
setSyncAction(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user