This commit is contained in:
Mirco Wittrien 2023-06-06 22:43:34 +02:00
parent d4b1e6bbb1
commit 1a70b445e2
2 changed files with 14 additions and 11 deletions

View File

@ -468,6 +468,7 @@
"HeaderBar": {"strings": [".hamburger", "scrollable", "themed"]}, "HeaderBar": {"strings": [".hamburger", "scrollable", "themed"]},
"HeaderBarChannelName": {"strings": ["onDoubleClick", ".setName", "maxLen:"]}, "HeaderBarChannelName": {"strings": ["onDoubleClick", ".setName", "maxLen:"]},
"HeaderBarContainer": {"strings": ["isAuthenticated", ".HEADER_BAR"]}, "HeaderBarContainer": {"strings": ["isAuthenticated", ".HEADER_BAR"]},
"HeaderBarRecipient": {"strings": [".Messages.DIRECT_MESSAGE", "getRecipientId", "().avatar", "getName"]},
"HeaderBarTitle": {"strings": [".titleWrapper", ",onContextMenu", "forceLevel:"]}, "HeaderBarTitle": {"strings": [".titleWrapper", ",onContextMenu", "forceLevel:"]},
"HeaderBarTitleIcon": {"strings": ["HEADER_BAR_BADGE", ".iconBadge", ".iconClassName"]}, "HeaderBarTitleIcon": {"strings": ["HEADER_BAR_BADGE", ".iconBadge", ".iconClassName"]},
"HomeButton": {"strings": ["isOnOtherSidebarRoute", "showProgressBadge", "maybeTrackExposure"]}, "HomeButton": {"strings": ["isOnOtherSidebarRoute", "showProgressBadge", "maybeTrackExposure"]},
@ -2082,6 +2083,7 @@
"channelcontainerdefault": ["ChannelContainer", "containerDefault"], "channelcontainerdefault": ["ChannelContainer", "containerDefault"],
"channelcontent": ["Channel", "content"], "channelcontent": ["Channel", "content"],
"channeldisabled": ["ChannelContainer", "disabled"], "channeldisabled": ["ChannelContainer", "disabled"],
"channelheaderavatar": ["ChatWindow", "avatar"],
"channelheaderchannelname": ["ChatWindow", "channelName"], "channelheaderchannelname": ["ChatWindow", "channelName"],
"channelheaderchildren": ["HeaderBar", "children"], "channelheaderchildren": ["HeaderBar", "children"],
"channelheadercursorpointer": ["ChatWindow", "cursorPointer"], "channelheadercursorpointer": ["ChatWindow", "cursorPointer"],

View File

@ -2,7 +2,7 @@
* @name EditUsers * @name EditUsers
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.7.9 * @version 4.8.0
* @description Allows you to locally edit Users * @description Allows you to locally edit Users
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -109,7 +109,6 @@ module.exports = (_ => {
"GuildInvitationRow", "GuildInvitationRow",
"GuildInvites", "GuildInvites",
"GuildMemberEntry", "GuildMemberEntry",
"HeaderBarContainer",
"MemberListItem", "MemberListItem",
"Message", "Message",
"MessageContent", "MessageContent",
@ -144,6 +143,7 @@ module.exports = (_ => {
"DirectMessageAddPopoutRow", "DirectMessageAddPopoutRow",
"DiscordTag", "DiscordTag",
"GuildInvitationRow", "GuildInvitationRow",
"HeaderBarRecipient",
"IncomingCallModal", "IncomingCallModal",
"MemberListItem", "MemberListItem",
"Mention", "Mention",
@ -472,15 +472,16 @@ module.exports = (_ => {
} }
} }
processHeaderBarContainer (e) { processHeaderBarRecipient (e) {
if (!this.settings.places.dmHeader) return; if (!this.settings.places.dmHeader || !e.instance.props.channel || !e.instance.props.channel.isDM()) return;
let channel = BDFDB.LibraryStores.ChannelStore.getChannel(e.instance.props.channelId); let recipientId = e.instance.props.channel.getRecipientId();
if (!channel || !channel.isDM()) return; let avatar = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelheaderavatar]]});
let userName = BDFDB.ReactUtils.findChild(e.instance, {props: [["className", BDFDB.disCN.channelheadercursorpointer]]}); if (avatar) avatar.props.src = this.getUserAvatar(recipientId);
if (!userName) return; let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelheadercursorpointer]]});
let recipientId = channel.getRecipientId(); if (userName) {
userName.props.children = this.getUserData(recipientId).username; userName.props.children = this.getUserData(recipientId).username;
this.changeUserColor(userName, recipientId); this.changeUserColor(userName, recipientId);
}
} }
processChannelCallHeader (e) { processChannelCallHeader (e) {