From 9f8c7494216b3d5aadb8d3fec14fa5ac7d8f448a Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 10 Jul 2024 04:33:03 -0300 Subject: [PATCH] Fix broken patches --- src/plugins/consoleJanitor/index.ts | 2 +- src/plugins/permissionsViewer/index.tsx | 2 +- src/plugins/reviewDB/index.tsx | 9 ++++----- src/plugins/showHiddenChannels/index.tsx | 6 +++--- src/plugins/viewIcons/index.tsx | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/plugins/consoleJanitor/index.ts b/src/plugins/consoleJanitor/index.ts index 30887f5a7..dfb59957d 100644 --- a/src/plugins/consoleJanitor/index.ts +++ b/src/plugins/consoleJanitor/index.ts @@ -114,7 +114,7 @@ export default definePlugin({ '("MessageActionCreators")', '("ChannelMessages")', '("Routing/Utils")', '("RTCControlSocket")', '("ConnectionEventFramerateReducer")', '("RTCLatencyTestManager")', - '("OverlayBridgeStore")', '("RPCServer:WSS")' + '("OverlayBridgeStore")', '("RPCServer:WSS")', '("RPCServer:IPC")' ].map(logger => ({ find: logger, predicate: () => settings.store.disableNoisyLoggers, diff --git a/src/plugins/permissionsViewer/index.tsx b/src/plugins/permissionsViewer/index.tsx index 6401d9450..6a503f2da 100644 --- a/src/plugins/permissionsViewer/index.tsx +++ b/src/plugins/permissionsViewer/index.tsx @@ -34,7 +34,7 @@ import UserPermissions from "./components/UserPermissions"; import { getSortedRoles, sortPermissionOverwrites } from "./utils"; const PopoutClasses = findByPropsLazy("container", "scroller", "list"); -const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "text"); +const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "banner"); export const enum PermissionsSortOrder { HighestRole, diff --git a/src/plugins/reviewDB/index.tsx b/src/plugins/reviewDB/index.tsx index 7fdc1509a..456e15a57 100644 --- a/src/plugins/reviewDB/index.tsx +++ b/src/plugins/reviewDB/index.tsx @@ -37,8 +37,7 @@ import { getCurrentUserInfo, readNotification } from "./reviewDbApi"; import { settings } from "./settings"; import { showToast } from "./utils"; -const PopoutClasses = findByPropsLazy("container", "scroller", "list"); -const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "text"); +const RoleButtonClasses = findByPropsLazy("button", "buttonInner", "icon", "banner"); const guildPopoutPatch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild, onClose(): void; }) => { if (!guild) return; @@ -181,9 +180,9 @@ export default definePlugin({ onClick={() => openReviewsModal(user.id, user.username)} look={Button.Looks.FILLED} size={Button.Sizes.NONE} - color={RoleButtonClasses.color} - className={classes(RoleButtonClasses.button, RoleButtonClasses.banner)} - innerClassName={classes(RoleButtonClasses.buttonInner, RoleButtonClasses.banner)} + color={RoleButtonClasses.bannerColor} + className={classes(RoleButtonClasses.button, RoleButtonClasses.icon, RoleButtonClasses.banner)} + innerClassName={classes(RoleButtonClasses.buttonInner, RoleButtonClasses.icon, RoleButtonClasses.banner)} > diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 538200afa..2d8b0c190 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -257,7 +257,7 @@ export default definePlugin({ { find: '"alt+shift+down"', replacement: { - match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?>0\)&&\(0,\i\.\i\)\(\i\))/, + match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,200}?>0\)&&\(0,\i\.\i\)\(\i\))/, replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})` } }, @@ -265,8 +265,8 @@ export default definePlugin({ { find: ".APPLICATION_STORE&&null!=", replacement: { - match: /(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/, - replace: ".filter(e=>!$self.isHiddenChannel(e))" + match: /getState\(\)\.channelId.+?(?=\.map\(\i=>\i\.id)/, + replace: "$&.filter(e=>!$self.isHiddenChannel(e))" } }, { diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index b2e7d56df..112f9f755 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -213,8 +213,8 @@ export default definePlugin({ { find: ".canUsePremiumProfileCustomization,{avatarSrc:", replacement: { - match: /children:\(0,\i\.jsx\)\(\i,{src:(\i)/, - replace: "style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)},$&" + match: /\.avatar,\i\.clickable\),onClick:\i,(?<=avatarSrc:(\i).+?)/, + replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)}," } },