mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: initial sync error showing up when sync is disabled
This commit is contained in:
parent
eec1b6ee50
commit
f0678934f8
1 changed files with 8 additions and 5 deletions
|
|
@ -98,15 +98,18 @@ export class SyncEffects {
|
|||
// initial after starting app
|
||||
this._syncProviderService.isEnabledAndReady$.pipe(
|
||||
take(1),
|
||||
switchMap((isEnabledAndReady) => {
|
||||
withLatestFrom(this._syncProviderService.isEnabled$),
|
||||
switchMap(([isEnabledAndReady, isEnabled]) => {
|
||||
if (isEnabledAndReady) {
|
||||
return of(SYNC_INITIAL_SYNC_TRIGGER);
|
||||
} else {
|
||||
if (isEnabled) {
|
||||
this._snackService.open({
|
||||
msg: T.F.SYNC.S.INITIAL_SYNC_ERROR,
|
||||
type: 'ERROR',
|
||||
});
|
||||
}
|
||||
this._syncService.setInitialSyncDone(true);
|
||||
this._snackService.open({
|
||||
msg: T.F.SYNC.S.INITIAL_SYNC_ERROR,
|
||||
type: 'ERROR',
|
||||
});
|
||||
return EMPTY;
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue