fix: remove confirmation dialog when restoring trashed note

This commit is contained in:
Antonella Sgarlatta
2021-05-06 10:57:57 -03:00
parent 7ed7c7640c
commit 1943b34fdf

View File

@@ -159,11 +159,12 @@ export class NotesState {
trashButtonRef: RefObject<HTMLButtonElement> trashButtonRef: RefObject<HTMLButtonElement>
): Promise<void> { ): Promise<void> {
if ( if (
await confirmDialog({ !trashed ||
(await confirmDialog({
title: Strings.trashNotesTitle, title: Strings.trashNotesTitle,
text: Strings.trashNotesText, text: Strings.trashNotesText,
confirmButtonStyle: 'danger', confirmButtonStyle: 'danger',
}) }))
) { ) {
this.application.changeItems<NoteMutator>( this.application.changeItems<NoteMutator>(
Object.keys(this.selectedNotes), Object.keys(this.selectedNotes),