feat: notes display criteria (#530)

* feat: notes display criteria

* chore: remove unused code

* chore: update names

* chore: update snjs version
This commit is contained in:
Mo Bitar
2021-03-04 12:22:14 -06:00
committed by GitHub
parent 9d017b5745
commit e0ab938ccf
7 changed files with 27 additions and 97 deletions

View File

@@ -460,7 +460,7 @@ class EditorViewCtrl extends PureViewCtrl<unknown, EditorState> {
await this.editor.insertTemplatedNote();
}
const selectedTag = this.appState.selectedTag;
if (!selectedTag?.isSmartTag() && !selectedTag?.hasRelationshipWithItem(note)) {
if (!selectedTag?.isSmartTag && !selectedTag?.hasRelationshipWithItem(note)) {
await this.application.changeItem(
selectedTag!.uuid,
(mutator) => {
@@ -1052,7 +1052,7 @@ class EditorViewCtrl extends PureViewCtrl<unknown, EditorState> {
if (savedUuid === this.note.uuid) {
const selectedTag = this.appState.selectedTag;
if (
!selectedTag?.isSmartTag() &&
!selectedTag?.isSmartTag &&
!selectedTag?.hasRelationshipWithItem(this.note)
) {
this.application.changeAndSaveItem(