mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-07 08:01:47 +01:00
This commit is contained in:
parent
cabe855372
commit
e674cfec70
4 changed files with 17 additions and 1 deletions
|
|
@ -4,6 +4,8 @@ import {Plugin} from "../plugin";
|
|||
import {getAllModels} from "../layout/getAll";
|
||||
import {resizeTopBar} from "../layout/util";
|
||||
/// #endif
|
||||
import {Constants} from "../constants";
|
||||
import {setStorageVal} from "../protyle/util/compatibility";
|
||||
|
||||
export const uninstall = (app: App, name: string, isUninstall = false) => {
|
||||
app.plugins.find((plugin: Plugin, index) => {
|
||||
|
|
@ -13,6 +15,8 @@ export const uninstall = (app: App, name: string, isUninstall = false) => {
|
|||
plugin.onunload();
|
||||
if (isUninstall) {
|
||||
plugin.uninstall();
|
||||
window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name] = {};
|
||||
setStorageVal(Constants.LOCAL_PLUGIN_DOCKS, window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS]);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`plugin ${plugin.name} onunload error:`, e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue