mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: process upload only after successful remote sync (#22360)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
fea5e6783c
commit
ee3c07d049
14 changed files with 156 additions and 73 deletions
|
|
@ -62,14 +62,24 @@ class SplashScreenPageState extends ConsumerState<SplashScreenPage> {
|
|||
infoProvider.getServerInfo();
|
||||
|
||||
if (Store.isBetaTimelineEnabled) {
|
||||
await Future.wait([backgroundManager.syncLocal(), backgroundManager.syncRemote()]);
|
||||
bool syncSuccess = false;
|
||||
await Future.wait([
|
||||
backgroundManager.hashAssets().then((_) {
|
||||
_resumeBackup(backupProvider);
|
||||
}),
|
||||
_resumeBackup(backupProvider),
|
||||
backgroundManager.syncLocal(),
|
||||
backgroundManager.syncRemote().then((success) => syncSuccess = success),
|
||||
]);
|
||||
|
||||
if (syncSuccess) {
|
||||
await Future.wait([
|
||||
backgroundManager.hashAssets().then((_) {
|
||||
_resumeBackup(backupProvider);
|
||||
}),
|
||||
_resumeBackup(backupProvider),
|
||||
]);
|
||||
} else {
|
||||
backupProvider.updateError(BackupError.syncFailed);
|
||||
await backgroundManager.hashAssets();
|
||||
}
|
||||
|
||||
if (Store.get(StoreKey.syncAlbums, false)) {
|
||||
await backgroundManager.syncLinkedAlbum();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue