diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts index ea5fc8ed4..252299c5e 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts +++ b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts @@ -50,7 +50,7 @@ export class PreferencesComponent extends BaseFormComponent { displaySuggestionsInPreview: [this.userPreferenceService.getDisplaySuggestionsInPreview()], // warnings preferences unapprovedSuggestionsWarning: [this.userPreferenceService.getUnapprovedSuggestionsWarning()], - loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning, 'true')], + loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning)], }); if (!this._permissionsService.has(ROLES.managePreferences)) { @@ -74,7 +74,7 @@ export class PreferencesComponent extends BaseFormComponent { if ( this.form.controls.loadAllAnnotationsWarning.value !== - this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning, 'true') + this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning) ) { await this.userPreferenceService.save( PreferencesKeys.loadAllAnnotationsWarning, diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index cc93d8ec2..a5c863763 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -640,7 +640,7 @@ export class FilePreviewScreenComponent filter(event => event.type === ViewerEvents.LOAD_ALL_ANNOTATIONS), switchMap(() => this._fileDataService.annotations), switchMap>(annotations => { - const showWarning = this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning, 'true'); + const showWarning = !this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning); const annotationsExceedThreshold = annotations.length >= this.configService.values.ANNOTATIONS_THRESHOLD; if (annotationsExceedThreshold && showWarning) { @@ -663,7 +663,7 @@ export class FilePreviewScreenComponent switchMap(async (result: ConfirmOptions) => { const doNotShowWarningAgain = result === ConfirmOptions.SECOND_CONFIRM; if (doNotShowWarningAgain) { - await this.userPreferenceService.save(PreferencesKeys.loadAllAnnotationsWarning, 'false'); + await this.userPreferenceService.save(PreferencesKeys.loadAllAnnotationsWarning, 'true'); await this.userPreferenceService.reload(); } const shouldLoad = [ConfirmOptions.CONFIRM, ConfirmOptions.SECOND_CONFIRM].includes(result);