This commit is contained in:
Mirco Wittrien 2024-05-16 18:10:43 +02:00
parent 2cbd6a1e5c
commit 57945c7e4b
2 changed files with 9 additions and 8 deletions

View File

@ -488,15 +488,16 @@
"UserGenericContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".USER_GENERIC_MENU"], "noSearch": true},
"UserInfo": {"strings": [".botTag", "isMobile:", ".discordTag"]},
"UserMemberContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".GUILD_CHANNEL_USER_MENU"], "noSearch": true},
"UserMemberSince": {"strings": [".memberSince", ".USER_PROFILE_DISCORD_MEMBER_SINCE"]},
"UserMention": {"strings": ["inlinePreview", "\"@\"", "renderPopout:"]},
"UsernameSection": {"strings": ["shouldCopyOnClick:", ".userTagDiscriminatorNoNickname"]},
"UserPopout": {"strings": ["{user:", "userId:", "\"Unexpected missing user\")", "getUser"], "noSearch": true},
"UserPopoutAvatar": {"strings": [".avatarDecorationHint", ".VIEW_PROFILE"], "noSearch": true},
"UserPopoutBody": {"strings": ["customStatusActivity:", "canDM:", "hidePersonalInformation:", "showCopiableUsername:"]},
"UserPopoutMemberSince": {"strings": [".title,", "textClassName:", ".USER_PROFILE_MEMBER_SINCE"]},
"UserProfile": {"strings": [".PROFILE_MODAL", "USER_INFO_CONNECTIONS", ".topSection"], "noSearch": true},
"UserProfileBody": {"strings": [".userInfoSectionHeader", "Messages.NOTE", "connectedAccounts:"], "noSearch": true},
"UserProfileHeader": {"strings": ["friendToken:", ".additionalActionsIcon", "onMessage"], "noSearch": true},
"UserProfileInfoSection": {"strings": ["userInfoText", ".USER_PROFILE_MEMBER_SINCE"], "noSearch": true},
"UserProfileMutualFriends": {"strings": [".getMutualFriends", ".listScroller", ".emptyText"]},
"UserProfileMutualGuilds": {"strings": [".getMutualGuilds", ".listScroller", ".emptyText"]},
"UserProfileUsername": {"strings": [".customStatusEmoji", ".customStatusSoloEmoji", ".findActivity(", ".CUSTOM_STATUS"], "noSearch": true},

View File

@ -2,7 +2,7 @@
* @name LastMessageDate
* @author DevilBro
* @authorId 278543574059057154
* @version 1.3.9
* @version 1.4.0
* @description Displays the Last Message Date of a Member for the current Server/DM in the UserPopout and UserModal
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -152,8 +152,8 @@ module.exports = (_ => {
"UserThemeContainer"
],
after: [
"UserMemberSince",
"UserProfileBody"
"UserPopoutMemberSince",
"UserProfileInfoSection"
]
};
@ -237,7 +237,7 @@ module.exports = (_ => {
if (e.instance.props.layout == "MODAL") currentProfile = e.instance;
}
processUserMemberSince (e) {
processUserPopoutMemberSince (e) {
if (!currentPopout) return;
let user = e.instance.props.user || BDFDB.LibraryStores.UserStore.getUser(e.instance.props.userId);
if (!user || user.isNonUserBot()) return;
@ -253,12 +253,12 @@ module.exports = (_ => {
];
}
processUserProfileBody (e) {
processUserProfileInfoSection (e) {
if (!currentProfile) return;
let user = e.instance.props.user || BDFDB.LibraryStores.UserStore.getUser(e.instance.props.userId);
if (!user || user.isNonUserBot()) return;
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "UserMemberSince"});
if (index > -1) children.splice(index, 0, BDFDB.ReactUtils.createElement(LastMessageDateComponents, {
let infoSection = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.userprofileinfosection]]});
if (infoSection) infoSection.props.children.splice(1, 0, BDFDB.ReactUtils.createElement(LastMessageDateComponents, {
isInPopout: false,
guildId: currentProfile.props.guildId || BDFDB.DiscordConstants.ME,
channelId: currentProfile.props.channelId,