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>
): Promise<void> {
if (
await confirmDialog({
!trashed ||
(await confirmDialog({
title: Strings.trashNotesTitle,
text: Strings.trashNotesText,
confirmButtonStyle: 'danger',
})
}))
) {
this.application.changeItems<NoteMutator>(
Object.keys(this.selectedNotes),