mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: reenable tags refreshing in editor
This commit is contained in:
@@ -211,16 +211,16 @@ class EditorStore extends BaseStore<EditorStore> {
|
||||
};
|
||||
|
||||
refreshTags = async () => {
|
||||
// const { session } = this.get();
|
||||
// if (!session.id) return;
|
||||
// this.set({
|
||||
// tags: await db.relations
|
||||
// .to({ id: session.id, type: "note" }, "tag")
|
||||
// .selector.items(undefined, {
|
||||
// sortBy: "dateCreated",
|
||||
// sortDirection: "asc"
|
||||
// })
|
||||
// });
|
||||
const { updateSession, getActiveSession } = this.get();
|
||||
const session = getActiveSession();
|
||||
if (!session || !("note" in session)) return;
|
||||
const tags = await db.relations
|
||||
.to({ id: session.note.id, type: "note" }, "tag")
|
||||
.selector.items(undefined, {
|
||||
sortBy: "dateCreated",
|
||||
sortDirection: "asc"
|
||||
});
|
||||
updateSession(session.id, ["readonly", "default"], { tags });
|
||||
};
|
||||
|
||||
refresh = async () => {
|
||||
|
||||
Reference in New Issue
Block a user