Skip to content

Commit aaa7107

Browse files
committed
【BUG】数据库右上角日程图标切换视图后消失 #3
1 parent ee6fe54 commit aaa7107

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/calendar/module-calendar.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ export class M_calendar {
116116
steveTools.outlog("自动更新日历文件<1>");
117117
}, 600000);
118118
}
119+
//解决 https://github.com/loonghfut/siyuan-steve-tools/issues/3
120+
window.siyuan.ws.ws.addEventListener('message', async (e) => {
121+
const msg = JSON.parse(e.data);
122+
if (msg.cmd === "transactions") {
123+
// console.log(msg);
124+
if(msg.data[0].doOperations[0].action==="updateAttrs"){
125+
console.log("updateAttrs");
126+
this.avButton();
127+
}
128+
}
129+
});
119130
}
120131

121132
async onLayoutReady() {

0 commit comments

Comments
 (0)