diff --git a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts index fabccfead..d7c4b44ce 100644 --- a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts +++ b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts @@ -35,7 +35,7 @@ export class EventConsumersPageComponent implements OnDestroy, OnInit { } public ngOnInit() { - this.eventConsumersState.load(false, true).pipe(onErrorResumeNext()).subscribe(); + this.eventConsumersState.load().pipe(onErrorResumeNext()).subscribe(); this.timerSubscription = timer(2000, 2000).pipe(switchMap(x => this.eventConsumersState.load(true, true).pipe(onErrorResumeNext()))) diff --git a/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts b/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts index bcf39a3e5..980ba1e92 100644 --- a/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts +++ b/src/Squidex/app/features/administration/state/event-consumers.state.spec.ts @@ -64,11 +64,11 @@ describe('EventConsumersState', () => { dialogs.verify(x => x.notifyError(It.isAny()), Times.once()); }); - it('should not show notification on load error when flag is false', () => { + it('should not show notification on load error when silent is true', () => { eventConsumersService.setup(x => x.getEventConsumers()) .returns(() => throwError({})); - eventConsumersState.load().pipe(onErrorResumeNext()).subscribe(); + eventConsumersState.load(true, true).pipe(onErrorResumeNext()).subscribe(); expect().nothing(); diff --git a/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts b/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts index 79b851195..b2ef916a0 100644 --- a/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts +++ b/src/Squidex/app/features/settings/pages/backups/backups-page.component.ts @@ -34,7 +34,7 @@ export class BackupsPageComponent implements OnInit, OnDestroy { } public ngOnInit() { - this.backupsState.load(false, true).pipe(onErrorResumeNext()).subscribe(); + this.backupsState.load().pipe(onErrorResumeNext()).subscribe(); this.timerSubscription = timer(3000, 3000).pipe(switchMap(t => this.backupsState.load(true, true).pipe(onErrorResumeNext()))) diff --git a/src/Squidex/app/shared/state/backups.state.spec.ts b/src/Squidex/app/shared/state/backups.state.spec.ts index ad1b63dfb..12cc4f74e 100644 --- a/src/Squidex/app/shared/state/backups.state.spec.ts +++ b/src/Squidex/app/shared/state/backups.state.spec.ts @@ -63,22 +63,22 @@ describe('BackupsState', () => { dialogs.verify(x => x.notifyInfo(It.isAnyString()), Times.once()); }); - it('should show notification on load error when silent is true', () => { + it('should show notification on load error when silent is false', () => { backupsService.setup(x => x.getBackups(app)) .returns(() => throwError({})); - backupsState.load(true, true).pipe(onErrorResumeNext()).subscribe(); + backupsState.load(true, false).pipe(onErrorResumeNext()).subscribe(); expect().nothing(); dialogs.verify(x => x.notifyError(It.isAny()), Times.once()); }); - it('should not show notification on load error when flag is false', () => { + it('should not show notification on load error when silent is true', () => { backupsService.setup(x => x.getBackups(app)) .returns(() => throwError({})); - backupsState.load().pipe(onErrorResumeNext()).subscribe(); + backupsState.load(true, true).pipe(onErrorResumeNext()).subscribe(); expect().nothing(); diff --git a/src/Squidex/app/shared/state/backups.state.ts b/src/Squidex/app/shared/state/backups.state.ts index 8501f635c..975c2b107 100644 --- a/src/Squidex/app/shared/state/backups.state.ts +++ b/src/Squidex/app/shared/state/backups.state.ts @@ -66,7 +66,7 @@ export class BackupsState extends State { }); }), catchError(error => { - if (silent) { + if (!silent) { this.dialogs.notifyError(error); }