Skip to content

Commit fdfefb5

Browse files
authored
🎨 Delete plugin data when uninstalling the plugin (#37)
1 parent 69df198 commit fdfefb5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Vanessa",
44
"url": "https://github.com/siyuan-note/plugin-sample",
55
"version": "0.4.3",
6-
"minAppVersion": "3.4.2",
6+
"minAppVersion": "3.5.0",
77
"backends": [
88
"windows",
99
"linux",

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ export default class PluginSample extends Plugin {
254254
console.log(this.i18n.byePlugin);
255255
}
256256

257-
uninstall() {
257+
async uninstall() {
258+
// 卸载插件时删除插件数据
259+
// Delete plugin data when uninstalling the plugin
260+
await this.removeData(STORAGE_NAME);
258261
console.log("uninstall");
259262
}
260263

0 commit comments

Comments
 (0)