Skip to content

Commit

Permalink
fix: do not close editor when editing an archived note
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Jan 19, 2021
1 parent d46f1fe commit 46ab8b9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/assets/javascripts/ui_models/app_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
DeinitSource,
UuidString,
SyncOpStatus,
PrefKey,
} from '@standardnotes/snjs';
import { WebApplication } from '@/ui_models/application';
import { Editor } from '@/ui_models/editor';
Expand Down Expand Up @@ -285,7 +286,14 @@ export class AppState {
this.closeEditor(editor);
} else if (note.trashed && !this.selectedTag?.isTrashTag) {
this.closeEditor(editor);
} else if (note.archived && !this.selectedTag?.isArchiveTag) {
} else if (
note.archived &&
!this.selectedTag?.isArchiveTag &&
!this.application.getPreference(
PrefKey.NotesShowArchived,
false
)
) {
this.closeEditor(editor);
}
}
Expand Down

0 comments on commit 46ab8b9

Please sign in to comment.