This commit is contained in:
Mirco Wittrien 2020-05-19 17:05:20 +02:00
parent 601e76aa9d
commit 942bbe6527
2 changed files with 3 additions and 6 deletions

View File

@ -3276,10 +3276,7 @@
BDFDB.ContextMenuUtils = {};
BDFDB.ContextMenuUtils.open = function (plugin, e, children) {
LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.ContextMenus.NativeContextMenu, Object.assign({}, e, {
BDFDBcontextMenu: true,
type: BDFDB.DiscordConstants.ContextMenuTypes.NATIVE_TEXT,
value: "",
return BDFDB.ReactUtils.createElement("div", Object.assign({}, e, {
className: BDFDB.disCN.contextmenu,
children: children
}));
@ -9560,7 +9557,7 @@
InternalBDFDB.patchContextMenuForPlugin = function (plugin, type, module) {
plugin = plugin == BDFDB && InternalBDFDB || plugin;
if (module && module.exports && module.exports.default) BDFDB.ModuleUtils.patch(plugin, module.exports, "default", {after: e => {
if (e.returnValue && typeof plugin[`on${type}`] === "function") plugin[`on${type}`]({instance:{props:e.methodArguments[0]}, returnvalue:e.returnValue, methodname:"default"});
if (e.returnValue && typeof plugin[`on${type}`] === "function") plugin[`on${type}`]({instance:{props:e.methodArguments[0]}, returnvalue:e.returnValue, methodname:"default", type:module.exports.default.displayName});
}});
};
InternalBDFDB.patchContextMenuForLib = function (menu, type) {

File diff suppressed because one or more lines are too long