mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
🐛 fix: handle sync status properly when fetching and reloading data
This commit is contained in:
parent
547fb02d13
commit
e9bb16488f
@ -22,13 +22,14 @@
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
fetching = true;
|
||||
syncToCloud(projectId); // don't wait for this
|
||||
await branchController
|
||||
.fetchFromTarget()
|
||||
.then(() => prService.reload())
|
||||
.finally(() => {
|
||||
fetching = false;
|
||||
try {
|
||||
syncToCloud(projectId); // don't wait for this
|
||||
await branchController.fetchFromTarget().then(() => {
|
||||
prService.reload();
|
||||
});
|
||||
} finally {
|
||||
fetching = false;
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#if !fetching}
|
||||
|
Loading…
Reference in New Issue
Block a user