fix: remove confirmation dialog when restoring trashed note
This commit is contained in:
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user