This commit is contained in:
Mirco Wittrien 2021-09-27 21:41:48 +02:00
parent 93260720c2
commit 30e937d5d4
2 changed files with 17 additions and 12 deletions

View File

@ -148,16 +148,21 @@ module.exports = (_ => {
}
}
stop () {
if (this.stopping) return;
this.stopping = true;
BDFDB.TimeUtils.timeout(_ => {delete this.stopping;});
BDFDB.TimeUtils.suppress(_ => {
if (typeof this.onStop == "function") this.onStop();
BDFDB.PluginUtils.clear(this);
}, "Failed to stop Plugin!", config.info)();
if (window.BDFDB_Global.loading) {
if (PluginStores.delayed.starts.includes(this)) PluginStores.delayed.starts.splice(PluginStores.delayed.starts.indexOf(this), 1);
}
else {
if (this.stopping) return;
this.stopping = true;
BDFDB.TimeUtils.timeout(_ => {delete this.stopping;});
BDFDB.TimeUtils.suppress(_ => {
if (typeof this.onStop == "function") this.onStop();
BDFDB.PluginUtils.clear(this);
}, "Failed to stop Plugin!", config.info)();
delete this.started;
delete this.started;
}
}
};
};
@ -6567,8 +6572,8 @@ module.exports = (_ => {
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TextInput, BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, {
className: BDFDB.disCN.inputmultilast,
inputClassName: BDFDB.disCN.inputmultifield,
onFocus: e => {this.setState({focused: true})},
onBlur: e => {this.setState({focused: false})}
onFocus: e => this.setState({focused: true}),
onBlur: e => this.setState({focused: false})
}), "children", "innerClassName"))
]
})

View File

@ -497,7 +497,7 @@ module.exports = (_ => {
}
onSwitch () {
if (typeof BDFDB === "object" && this.settings.general.forceOpenFolder) {
if (typeof BDFDB === "object" && BDFDB.loaded && this.settings.general.forceOpenFolder) {
let folder = BDFDB.GuildUtils.getFolder(BDFDB.LibraryModules.LastGuildStore.getGuildId());
if (folder && !BDFDB.LibraryModules.FolderUtils.isFolderExpanded(folder.folderId)) BDFDB.LibraryModules.GuildUtils.toggleGuildFolderExpand(folder.folderId);
}