Fix console.log guild render spam (#289)
* Update main.js * Update main.js * Update main.min.js
This commit is contained in:
parent
21981b15e8
commit
4daf2cd465
22
js/main.js
22
js/main.js
|
@ -2642,16 +2642,18 @@ class V2 {
|
||||||
const GuildComponent = reactInstance.return.type;
|
const GuildComponent = reactInstance.return.type;
|
||||||
if (!GuildComponent) return;
|
if (!GuildComponent) return;
|
||||||
this.guildListItemsPatch = BdApi.monkeyPatch(GuildComponent.prototype, "render", {after: (data) => {
|
this.guildListItemsPatch = BdApi.monkeyPatch(GuildComponent.prototype, "render", {after: (data) => {
|
||||||
const returnValue = data.returnValue;
|
if (data.returnValue && data.thisObject) {
|
||||||
const guildData = data.thisObject.props;
|
const returnValue = data.returnValue;
|
||||||
returnValue.props.className += " bd-guild";
|
const guildData = data.thisObject.props;
|
||||||
if (guildData.unread) returnValue.props.className += " bd-unread";
|
returnValue.props.className += " bd-guild";
|
||||||
if (guildData.selected) returnValue.props.className += " bd-selected";
|
if (guildData.unread) returnValue.props.className += " bd-unread";
|
||||||
if (guildData.audio) returnValue.props.className += " bd-audio";
|
if (guildData.selected) returnValue.props.className += " bd-selected";
|
||||||
if (guildData.video) returnValue.props.className += " bd-video";
|
if (guildData.audio) returnValue.props.className += " bd-audio";
|
||||||
if (guildData.badge) returnValue.props.className += " bd-badge";
|
if (guildData.video) returnValue.props.className += " bd-video";
|
||||||
if (guildData.animatable) returnValue.props.className += " bd-animatable";
|
if (guildData.badge) returnValue.props.className += " bd-badge";
|
||||||
return returnValue;
|
if (guildData.animatable) returnValue.props.className += " bd-animatable";
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue