This commit is contained in:
Mirco Wittrien 2020-06-23 16:19:17 +02:00
parent 68a20123ef
commit ca616ba2dd
1 changed files with 13 additions and 8 deletions

View File

@ -6,17 +6,13 @@ var EditUsers = (_ => {
return class EditUsers {
getName () {return "EditUsers";}
getVersion () {return "3.8.5";}
getVersion () {return "3.8.6";}
getAuthor () {return "DevilBro";}
getDescription () {return "Allows you to change the icon, name, tag and color of users.";}
constructor () {
this.changelog = {
"fixed":[["Context Menu Update","Fixes for the context menu update, yaaaaaay"]]
};
this.patchedModules = {
before: {
HeaderBarContainer: "render",
@ -64,6 +60,7 @@ var EditUsers = (_ => {
InviteModalUserRow: "default",
TypingUsers: "render",
DirectMessage: "render",
RTCConnection: "render",
PrivateChannel: "render",
QuickSwitchUserResult: "render",
IncomingCall: "render"
@ -773,9 +770,17 @@ var EditUsers = (_ => {
}
}
processRTCConnection (e) {
if (e.instance.props.channel && e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.DM && settings.changeInRecentDms) {
let recipientId = e.instance.props.channel.getRecipientId();
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "PanelSubtext"});
if (index > -1) children[index].props.children = "@" + this.getUserData(recipientId).username;
}
}
processPrivateChannelCallParticipants (e) {
if (BDFDB.ArrayUtils.is(e.instance.props.participants) && settings.changeInDmCalls) {
for (let participant of e.instance.props.participants) if (participant && participant.user) participant.user = this.getUserData(participant.user.id);
for (let participant of e.instance.props.participants) if (participant && participant.user) participant.user = this.getUserData(participant.user.id, true, true);
}
}