From f0ff31067cb40d4b8ce3f272dc99dffffe953792 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 5 Aug 2025 00:14:59 -0400 Subject: [PATCH] Patch Fixes Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com> --- src/equicordplugins/discordDevBanner/index.tsx | 1 + src/equicordplugins/loginWithQR/index.tsx | 2 +- src/plugins/showHiddenChannels/index.tsx | 12 +++--------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/equicordplugins/discordDevBanner/index.tsx b/src/equicordplugins/discordDevBanner/index.tsx index bd354a0e0..cb8bee2ba 100644 --- a/src/equicordplugins/discordDevBanner/index.tsx +++ b/src/equicordplugins/discordDevBanner/index.tsx @@ -34,6 +34,7 @@ export function transform(state?: string): string | JSX.Element { const baseFormat = state ?? format; const replaced = baseFormat + .replace(/{discordName}/g, "Discord") .replace(/{buildChannel}/g, buildChannel) .replace(/{buildNumber}/g, BUILD_NUMBER) .replace(/{buildHash}/g, VERSION_HASH.slice(0, 9)) diff --git a/src/equicordplugins/loginWithQR/index.tsx b/src/equicordplugins/loginWithQR/index.tsx index 793c4939b..351a84f80 100644 --- a/src/equicordplugins/loginWithQR/index.tsx +++ b/src/equicordplugins/loginWithQR/index.tsx @@ -72,7 +72,7 @@ export default definePlugin({ // Insert a Scan QR Code button in the Settings sheet { - find: "useGenerateUserSettingsSections", + find: ".isInputProfileCustom()", replacement: { match: /\.CONNECTIONS/, replace: "$&,\"SCAN_QR_CODE\"" diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 1d9b239c6..d0bd3b4bc 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -361,20 +361,14 @@ export default definePlugin({ replacement: [ { // Create a variable for the channel prop - match: /users:\i,maxUsers:\i.+?}=(\i).*?;/, - replace: (m, props) => `${m}let{shcChannel}=${props};` + match: /(function \i\(\i\)\{)([^}]+?hideOverflowCount)/, + replace: "$1let {shcChannel}=arguments[0];$2" }, { // Make Discord always render the plus button if the component is used inside the HiddenChannelLockScreen - match: /\i>0(?=&&.{0,30}Math.min)/, + match: /\i>0(?=&&!\i&&!\i)/, replace: m => `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${m})` }, - { - // Prevent Discord from overwriting the last children with the plus button - // if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen - match: /(?<=\i\.length-)1(?=\]=.{0,60}renderPopout)(?<=(\i)=\i\.length-\i.+?)/, - replace: (_, amount) => `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${amount}<=0?0:1)` - }, { // Show only the plus text without overflowed children amount // if the overflow amount is <= 0 and the component is used inside the HiddenChannelLockScreen