This commit is contained in:
Mirco Wittrien 2022-10-10 15:53:50 +02:00
parent fcebad3c0a
commit cdca6122b9
9 changed files with 41 additions and 36 deletions

View File

@ -128,6 +128,9 @@
"MentionUtils": {"strings": ["rawMessage", "mention_everyone", "mentionUsers"], "exported": false, "value": "exports", "map": {
"isRawMessageMentioned": ["rawMessage", "mention_everyone", "mentionUsers"]
}},
"MessageComponentUtils": {"strings": ["ANIMATE_CHAT_AVATAR", "interactionUsernameProfile"], "exported": false, "value": "exports", "map": {
"useHoveredMessage": ["ANIMATE_CHAT_AVATAR"]
}},
"MessageManageUtils": {"strings": ["showMentionToggle", "SEND_FAILED", "shouldMention"], "exported": false, "value": "exports", "map": {
"copyLink": [".guild_id"],
"replyToMessage": ["showMentionToggle", "shouldMention"]
@ -167,14 +170,14 @@
"SettingsUtils": {"strings": ["ON_FOR_LARGE_GUILDS", "updateSetting", "useSetting"], "exported": false, "value": "exports"},
"SimpleMarkdownComponents": {"strings": ["customEmoji", "emojiTooltipPosition", "timestampTooltip"]},
"SimpleMarkdownParser": {"props": ["parseBlock", "parseInline", "defaultOutput"]},
"SlateRichUtils": {"strings": ["textValue", "richValue", "text:\"\""], "nonString": ["createElement"], "exported": false, "value": "exports", "map": {
"SlateRichUtils": {"strings": ["textValue", "richValue", "text:\"\""], "nonStrings": ["createElement"], "exported": false, "value": "exports", "map": {
"toRichValue": [".split(\"\\n\")"]
}},
"SlateTextUtils": {"strings": ["ignoreTrailingEmptyNodes", "preventEmojiSurrogates"], "nonString": ["createElement"], "exported": false, "value": "exports", "map": {
"SlateTextUtils": {"strings": ["ignoreTrailingEmptyNodes", "preventEmojiSurrogates"], "nonStrings": ["createElement"], "exported": false, "value": "exports", "map": {
"toTextValue": ["ignoreTrailingEmptyNodes"]
}},
"SoundParser": {"strings": ["discodo", "ddr-down", "mute"]},
"SoundUtils": {"strings": [".play()", ".disableSounds", "getSoundpack"], "nonString": ["createElement"], "exported": false, "value": "exports", "map": {
"SoundUtils": {"strings": [".play()", ".disableSounds", "getSoundpack"], "nonStrings": ["createElement"], "exported": false, "value": "exports", "map": {
"createSound": ["return new"],
"playSound": ["getSoundpack"]
}},
@ -190,6 +193,9 @@
"UploadUtils": {"props": ["upload", "instantBatchUpload"]},
"URLParser": {"props": ["parse", "resolveObject"]},
"UserNameUtils": {"props": ["getNickname", "getName", "useName"]},
"UserPopoutUtils": {"strings": ["Cannot moderate", "user:", "showMute"], "exported": false, "value": "exports", "map": {
"openUserContextMenu": ["showMute"]
}},
"UserProfileUtils": {"strings": ["USER_AGREEMENTS", "user cannot be undefined"], "exported": false, "value": "exports", "map": {
"fetchProfile": [".apply("],
"getUser": ["\"USER_UPDATE\""]
@ -245,19 +251,6 @@
"FormText": [".type", ".DEFAULT"],
"FormTitle": [".tag", "variant:\"text"]
}},
"GuildComponents": {
"children": {
"Badge": {"name": "GuildBadge"},
"BlobMask": {"name": "BlobMask"},
"DragPlaceholder": {"name": "DragPlaceholder"},
"Favorites": {"strings": [".favoriteIcon", "FAVORITES_GUILD_NAME"]},
"Icon": {"name": "GuildIconWrapper"},
"MutedText": {"props": ["useMutedUntilText"], "value": "default"},
"Pill": {"strings": ["opacity:1,height:", "20:8", "default.item"]},
"Separator": {"strings": ["className", "default.guildSeparator"]},
"UnavailableGuildsButton": {"strings": ["className", "default.guildsError"]}
}
},
"Header": {"props": ["Sizes", "Tags"]},
"Heading": {"strings": ["data-excessive", ".defaultColor"]},
"HeaderBarComponents": {"strings": ["isAuthenticated", ".HEADER_BAR"]},
@ -266,6 +259,10 @@
"ImageReadyStates": ["LOADING", "ERROR"]
}},
"ImageModal": {"strings": ["mobileCloseWrapper", "closeAction"]},
"LayerContainerComponents": {"strings": ["layerContainerElement", "LayerProvider"], "exported": false, "value": "exports", "map": {
"createLayer": [".createContext"],
"LayerContainer": [".layerContainer", "missing parent"]
}},
"LazyImage": {"strings": ["LOADING", "visibilityObserver"]},
"ListHeader": {"strings": [".container", "\"h2\"", "[\"aria-label\"]"]},
"Mask": {"props": "Masks"},
@ -321,16 +318,28 @@
"PatchModules": {
"Account": {"protos": ["renderAvatarWithPopout", "renderCopiableNameTag", "renderCopiedSuccess"]},
"AnalyticsContext": {"props": ["ObjectTypes", "Objects", "Pages", "Sections"]},
"BlobMask": {"protos": ["getBadgePositionInterpolation", "getUpperBadgeStyles"]},
"DiscordTag": {"strings": ["hidePersonalInformation", "isVerifiedBot", "botType"]},
"DMUserContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".DM_USER_MENU"]},
"EmojiPickerListRow": {"strings": ["emojiSize", "surrogateCodePoint", "EMOJI_FAVORITE_TOOLTIP"]},
"GroupDMUserContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".GROUP_DM_USER_MENU"]},
"GuildContextMenu": {"strings": ["GUILD_ACTIONS_MENU_LABEL", "navId:\"guild", "GuildContextMenu"]},
"GuildChannelUserContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".GUILD_CHANNEL_USER_MENU"]},
"GuildSidebar": {"strings": ["\"guildsnav\"", "unreadMentionsIndicatorBottom"]},
"LayerProvider": {"strings": ["layerContainerElement", "getContextValue"]},
"MemberListItem": {"protos": ["renderOwner", "renderDecorators", "renderPremium"]},
"Menu": {"strings": ["\"empty\"", "getItemProps", "isUsingKeyboardNavigation"]},
"MessageContextMenu": {"strings": ["MESSAGE_ACTIONS_MENU_LABEL", "navId:\"message\""]},
"MessageContextMenu": {"strings": ["MESSAGE_ACTIONS_MENU_LABEL", "navId:\"message", "getGuildId"]},
"MessageHeader": {"strings": ["showTimestampOnHover", "usernameClassName", "isVisibleOnlyOnHover:"]},
"MessageSearchResultContextMenu": {"strings": ["MESSAGE_ACTIONS_MENU_LABEL", "navId:\"message"], "nonStrings": ["getGuildId"]},
"ParticipantsForSelectedParticipant": {"strings": ["ACTIVITY", "maxVisibleUsers", "participantType"]},
"PrivateChannel": {"strings": ["LEAVE_GROUP_DM_MANAGED_BODY", "handleCloseButtonMouseDown", "handleLeaveGroup"]},
"SearchBar": {"strings": [").inputRef", ".containerRef", ".handleOnChange"]},
"SearchResult": {"strings": [".onJump", "message:", "handleMessageClick"]},
"Shakeable": {"protos": ["shake", "getDefaultAnimProps", "stop"]},
"TransitionGroup": {"protos": ["performAppear", "performEnter", "performLeave"]},
"UseCopyIdItem": {"strings": ["\"devmode-copy-id\""]},
"UserGenericContextMenu": {"strings": ["USER_ACTIONS_MENU_LABEL", "navId:\"user", ".USER_GENERIC_MENU"]},
"UserPopoutAvatar": {"strings": ["isNonUserBot", "avatarHintInnerText", "avatarDecorationHint"]},
"UserThemePopoutHeader": {"strings": [".avatarPositionPremiumNoBanner", "syncProfileThemeWithUserTheme"]}
},

View File

@ -151,9 +151,8 @@ module.exports = (_ => {
}
}
forceUpdateAll () {
BDFDB.PatchUtils.forceAllUpdates(this);
BDFDB.GuildUtils.rerenderAll();
forceUpdateAll () {
BDFDB.DiscordUtils.rerenderAll();
}
processGuilds (e) {

View File

@ -196,8 +196,7 @@ module.exports = (_ => {
forceUpdateAll () {
changedGuilds = BDFDB.DataUtils.load(this, "servers");
BDFDB.PatchUtils.forceAllUpdates(this);
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
onGuildContextMenu (e) {

View File

@ -291,8 +291,7 @@ module.exports = (_ => {
forceUpdateAll () {
defaultSettings = Object.assign(BDFDB.ObjectUtils.map(statuses, status => notificationTypes[status.value ? "TOAST" : "DISABLED"].value), {timelog: true}, BDFDB.DataUtils.load(this, "defaultSettings"));
BDFDB.GuildUtils.rerenderAll();
BDFDB.PatchUtils.forceAllUpdates(this);
BDFDB.DiscordUtils.rerenderAll();
}
getSettingsPanel (collapseStates = {}) {

View File

@ -903,7 +903,7 @@ module.exports = (_ => {
if (!Object.keys(this.settings.preCategories).every(type => this.settings.preCategories[type].enabled) && BDFDB.ObjectUtils.isEmpty(this.getPinnedChannels(type))) this.forceUpdateAll();
break;
case "guildList":
BDFDB.GuildUtils.rerenderAll(true);
BDFDB.DiscordUtils.rerenderAll(true);
break;
}
}

View File

@ -261,8 +261,7 @@ module.exports = (_ => {
}
forceUpdateAll () {
BDFDB.PatchUtils.forceAllUpdates(this);
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
processGuilds (e) {

View File

@ -66,11 +66,11 @@ module.exports = (_ => {
}
onStart () {
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
onStop () {
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
processGuilds (e) {

View File

@ -320,7 +320,7 @@ module.exports = (_ => {
}
`);
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
processGuildItem (e) {

View File

@ -77,7 +77,7 @@ module.exports = (_ => {
hiddenEles = BDFDB.DataUtils.load(this, "hidden");
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.DispatchApiUtils, "dispatch", {after: e => {
if (e.methodArguments[0].type == "STREAMER_MODE_UPDATE") BDFDB.GuildUtils.rerenderAll(true);
if (e.methodArguments[0].type == "STREAMER_MODE_UPDATE") BDFDB.DiscordUtils.rerenderAll(true);
}});
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SortedGuildUtils, "getGuildFolderById", {after: e => {
@ -90,11 +90,11 @@ module.exports = (_ => {
}
}});
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
onStop () {
BDFDB.GuildUtils.rerenderAll();
BDFDB.DiscordUtils.rerenderAll();
}
getSettingsPanel (collapseStates = {}) {
@ -119,7 +119,7 @@ module.exports = (_ => {
onClick: _ => {
BDFDB.ModalUtils.confirm(this, "Are you sure you want to unhide all Servers and Folders?", _ => {
BDFDB.DataUtils.save([], this, "hidden");
BDFDB.GuildUtils.rerenderAll(true);
BDFDB.DiscordUtils.rerenderAll(true);
});
},
children: BDFDB.LanguageUtils.LanguageStrings.RESET
@ -303,7 +303,7 @@ module.exports = (_ => {
BDFDB.DataUtils.save(hiddenEles, this, "hidden");
for (let i in switchInstances) switchInstances[i].props.value = enabled;
BDFDB.ReactUtils.forceUpdate(BDFDB.ObjectUtils.toArray(switchInstances));
BDFDB.GuildUtils.rerenderAll(true);
BDFDB.DiscordUtils.rerenderAll(true);
}
}]
});
@ -315,7 +315,7 @@ module.exports = (_ => {
else array.push(id);
hiddenEles = Object.assign({}, hiddenEles, {[type]: array});
BDFDB.DataUtils.save(hiddenEles, this, "hidden");
BDFDB.GuildUtils.rerenderAll(true);
BDFDB.DiscordUtils.rerenderAll(true);
}
setLabelsByLanguage () {