refactored TabContext => NoteContext

This commit is contained in:
zadam
2021-05-22 12:42:34 +02:00
parent 79a85a0aa7
commit 1a0aaf4a30
11 changed files with 18 additions and 22 deletions

View File

@@ -2,7 +2,7 @@ import BasicWidget from "./basic_widget.js";
import appContext from "../services/app_context.js";
export default class NoteContextAwareWidget extends BasicWidget {
isTab(ntxId) {
isNoteContext(ntxId) {
if (Array.isArray(ntxId)) {
return this.noteContext && ntxId.includes(this.noteContext.ntxId);
}
@@ -11,10 +11,6 @@ export default class NoteContextAwareWidget extends BasicWidget {
}
}
isTabOrParent(ntxId) {
return this.noteContext && (this.noteContext.ntxId === ntxId || this.noteContext.mainNtxId === ntxId);
}
isNote(noteId) {
return this.noteId === noteId;
}