This commit is contained in:
Mirco Wittrien 2019-12-11 00:35:07 +01:00
parent 4c40dfec23
commit 6f1fccf9fb
2 changed files with 5 additions and 5 deletions

View File

@ -1019,7 +1019,6 @@
WebModulesData.Patchfinder = { WebModulesData.Patchfinder = {
Account: "accountinfo", Account: "accountinfo",
App: "app", App: "app",
AppSkeleton: "app",
AppView: "appcontainer", AppView: "appcontainer",
AuthWrapper: "loginscreen", AuthWrapper: "loginscreen",
BannedCard: "guildsettingsbannedcard", BannedCard: "guildsettingsbannedcard",
@ -1029,6 +1028,7 @@
Guild: "guildouter", Guild: "guildouter",
GuildIcon: "avataricon", GuildIcon: "avataricon",
GuildSidebar: "guildchannels", GuildSidebar: "guildchannels",
I18nLoaderWrapper: "app",
InstantInviteModal: "invitemodalwrapper", InstantInviteModal: "invitemodalwrapper",
InvitationCard: "invitemodalinviterow", InvitationCard: "invitemodalinviterow",
InviteCard: "guildsettingsinvitecard", InviteCard: "guildsettingsinvitecard",
@ -1088,8 +1088,8 @@
originalMethodName: modulefunction, originalMethodName: modulefunction,
callOriginalMethod: _ => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments) callOriginalMethod: _ => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)
}; };
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded && module.BDFDBpatch[modulefunction] && !module.BDFDBpatch[modulefunction].triggered) { if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded && module.BDFDBpatch[modulefunction] && !data.thisObject.BDFDBtriggered) {
module.BDFDBpatch[modulefunction].triggered = true; data.thisObject.BDFDBtriggered = true;
if (!BDFDB.ObjectUtils.isEmpty(module.BDFDBpatch[modulefunction].before)) for (let id in BDFDB.ObjectUtils.sort(module.BDFDBpatch[modulefunction].before)) { if (!BDFDB.ObjectUtils.isEmpty(module.BDFDBpatch[modulefunction].before)) for (let id in BDFDB.ObjectUtils.sort(module.BDFDBpatch[modulefunction].before)) {
BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].before[id], `"before" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].before[id].pluginname)(data); BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].before[id], `"before" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].before[id].pluginname)(data);
} }
@ -1102,7 +1102,7 @@
let tempreturn = BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].after[id], `"after" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].after[id].pluginname)(data); let tempreturn = BDFDB.TimeUtils.suppress(module.BDFDBpatch[modulefunction].after[id], `"after" callback of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`, module.BDFDBpatch[modulefunction].after[id].pluginname)(data);
if (tempreturn !== undefined) data.returnValue = tempreturn; if (tempreturn !== undefined) data.returnValue = tempreturn;
} }
BDFDB.TimeUtils.timeout(_ => {delete module.BDFDBpatch[modulefunction].triggered;}); BDFDB.TimeUtils.timeout(_ => {delete data.thisObject.BDFDBtriggered;});
} }
else BDFDB.TimeUtils.suppress(data.callOriginalMethod, `originalMethod of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`)(); else BDFDB.TimeUtils.suppress(data.callOriginalMethod, `originalMethod of ${modulefunction} in ${module.constructor ? module.constructor.displayName || module.constructor.name : "module"}`)();
return modulefunction == "render" && data.returnValue === undefined ? null : data.returnValue; return modulefunction == "render" && data.returnValue === undefined ? null : data.returnValue;

File diff suppressed because one or more lines are too long