From 1df0b571af6c2c122033fa75889caff1f9193889 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:56:01 -0300 Subject: [PATCH] Fix broken patches --- src/plugins/fakeNitro/index.ts | 2 +- src/plugins/showHiddenChannels/index.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/fakeNitro/index.ts b/src/plugins/fakeNitro/index.ts index 3ac7555..9577718 100644 --- a/src/plugins/fakeNitro/index.ts +++ b/src/plugins/fakeNitro/index.ts @@ -359,7 +359,7 @@ export default definePlugin({ }, // Separate patch for allowing using custom app icons { - find: "location:\"AppIconHome\"", + find: ".FreemiumAppIconIds.DEFAULT&&(", replacement: { match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, replace: "true" diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index f242146..906bed5 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -77,7 +77,7 @@ export default definePlugin({ }, // Do not check for unreads when selecting the render level if the channel is hidden { - match: /(?=!\(0,\i\.getHasImportantUnread\)\(this\.record\))/, + match: /(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/, replace: "$self.isHiddenChannel(this.record)||" }, // Make channels we dont have access to be the same level as normal ones @@ -334,12 +334,12 @@ export default definePlugin({ replacement: [ { // Remove the divider and the open chat button for the HiddenChannelLockScreen - match: /"more-options-popout"\)\),(?<=let{channel:(\i).+?inCall:(\i).+?)/, + match: /"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/, replace: (m, channel, inCall) => `${m}${inCall}||!$self.isHiddenChannel(${channel},true)&&` }, { // Remove invite users button for the HiddenChannelLockScreen - match: /"popup".{0,100}?if\((?<=let{channel:(\i).+?inCall:(\i).+?)/, + match: /"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/, replace: (m, channel, inCall) => `${m}(${inCall}||!$self.isHiddenChannel(${channel},true))&&` }, ]