Skip to content

Commit

Permalink
fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
WingDr committed Apr 25, 2024
1 parent 05ad925 commit c29d438
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-plugin-sidebar-memo",
"author": "WingDr",
"url": "https://github.com/WingDr/siyuan-plugin-sidebar-memo",
"version": "0.2.2",
"version": "0.2.3",
"minAppVersion": "2.10.0",
"backends": ["all"],
"frontends": ["desktop", "desktop-window", "browser-desktop"],
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export default class PluginSidebarMemo extends Plugin {
if (isDev) this.logger.info("找到编辑器, editor =>", this.editorNode);

this.initHandleFunctions();
this.openSideBar(this.data[STORAGE_NAME].openSideBarMemo);
this.openSideBar(this.data[STORAGE_NAME].openSideBarMemo, true);
}

onunload() {
this.openSideBar(false, false);
this.openSideBar(false);
}


Expand Down Expand Up @@ -138,7 +138,7 @@ export default class PluginSidebarMemo extends Plugin {
icon: "iconLayoutBottom",
label: this.data[STORAGE_NAME].openSideBarMemo ? this.i18n.closeSidebarMemo : this.i18n.openSidebarMemo,
click: () => {
this.openSideBar(!this.data[STORAGE_NAME].openSideBarMemo);
this.openSideBar(!this.data[STORAGE_NAME].openSideBarMemo, true);
}
});
}
Expand Down Expand Up @@ -258,7 +258,7 @@ export default class PluginSidebarMemo extends Plugin {
};
}

private openSideBar(open: boolean, save=true) {
private openSideBar(open: boolean, save=false) {
if (isDev) this.logger.info("open sidebar 触发, open=>", {open});
if (open) {
this.memoObservers = {};
Expand Down

0 comments on commit c29d438

Please sign in to comment.