RED-6960 - Enter should always confirm a modal window

This commit is contained in:
Valentin Mihai 2023-12-20 10:33:25 +02:00
parent 8fe443ba69
commit 84986155dd
2 changed files with 3 additions and 3 deletions

View File

@ -669,12 +669,12 @@ export class FilePreviewScreenComponent
const ref = this._dialogService.openDialog('confirm', data);
return ref.afterClosed().pipe(
switchMap(async (result: ConfirmOption) => {
const doNotShowWarningAgain = result === ConfirmOptions.SECOND_CONFIRM;
const doNotShowWarningAgain = result === ConfirmOptions.CONFIRM_WITH_ACTION;
if (doNotShowWarningAgain) {
await this.userPreferenceService.save(PreferencesKeys.loadAllAnnotationsWarning, 'true');
await this.userPreferenceService.reload();
}
const validOptions: number[] = [ConfirmOptions.CONFIRM, ConfirmOptions.SECOND_CONFIRM];
const validOptions: number[] = [ConfirmOptions.CONFIRM, ConfirmOptions.CONFIRM_WITH_ACTION];
const shouldLoad = validOptions.includes(result);
return [shouldLoad, annotations] as const;
}),

@ -1 +1 @@
Subproject commit 7f09e572488d1836aa24df7a9600f0c657b4a6be
Subproject commit da086cdaa648d1d35a9eb16ee23cb223e1de2316