Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-10-29 17:40:54 +02:00
parent 26e59d21a2
commit 3227074080
1 changed files with 12 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 1.9.5
* @version 1.9.6
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -19,7 +19,7 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "1.9.5",
"version": "1.9.6",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
@ -2225,10 +2225,12 @@ module.exports = (_ => {
}
else {
let unmappedType = type.split(" _ _ ")[1] || type;
ins = BDFDB.ReactUtils.findConstructor(ins, unmappedType) || BDFDB.ReactUtils.findConstructor(ins, unmappedType, {up: true}) || ins;
InternalBDFDB.patchComponent(pluginDataObjs, ins, type, config);
BDFDB.PatchUtils.forceAllUpdates(pluginDataObjs.map(n => n.plugin), type);
return true;
let constructor = BDFDB.ReactUtils.findConstructor(ins, unmappedType) || BDFDB.ReactUtils.findConstructor(ins, unmappedType, {up: true});
if (constructor) {
InternalBDFDB.patchComponent(pluginDataObjs, constructor, type, config);
BDFDB.PatchUtils.forceAllUpdates(pluginDataObjs.map(n => n.plugin), type);
return true;
}
}
return false;
};
@ -7888,6 +7890,7 @@ module.exports = (_ => {
InternalBDFDB.patchedModules = {
before: {
EmojiPicker: "type",
EmojiPickerListRow: "default"
},
after: {
@ -8035,6 +8038,9 @@ module.exports = (_ => {
InternalBDFDB.processDiscordTag = function (e) {
if (e.instance && e.instance.props && e.returnvalue && e.instance.props.user) e.returnvalue.props.user = e.instance.props.user;
};
InternalBDFDB.processEmojiPicker = function (e) {
if (BDFDB.ObjectUtils.toArray(PluginStores.loaded).filter(p => p.started).some(p => p.onSystemMessageOptionContextMenu || p.onSystemMessageOptionToolbar || p.onMessageOptionContextMenu || p.onMessageOptionToolbar)) e.instance.props.persistSearch = true;
};
InternalBDFDB.processEmojiPickerListRow = function (e) {
if (e.instance.props.emojiDescriptors && InternalComponents.LibraryComponents.EmojiPickerButton.current && InternalComponents.LibraryComponents.EmojiPickerButton.current.props && InternalComponents.LibraryComponents.EmojiPickerButton.current.props.allowManagedEmojisUsage) for (let i in e.instance.props.emojiDescriptors) e.instance.props.emojiDescriptors[i] = Object.assign({}, e.instance.props.emojiDescriptors[i], {isDisabled: false});
};