Skip to content

Commit

Permalink
fix: remove confirmation dialog when restoring trashed note
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed May 6, 2021
1 parent 7ed7c76 commit 1943b34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/ui_models/app_state/notes_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1943b34

Please sign in to comment.