Fix broken patches

This commit is contained in:
Nuckyz 2023-12-12 22:56:01 -03:00
parent 6d911790e9
commit 1df0b571af
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 4 additions and 4 deletions

View file

@ -359,7 +359,7 @@ export default definePlugin({
}, },
// Separate patch for allowing using custom app icons // Separate patch for allowing using custom app icons
{ {
find: "location:\"AppIconHome\"", find: ".FreemiumAppIconIds.DEFAULT&&(",
replacement: { replacement: {
match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,
replace: "true" replace: "true"

View file

@ -77,7 +77,7 @@ export default definePlugin({
}, },
// Do not check for unreads when selecting the render level if the channel is hidden // 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)||" replace: "$self.isHiddenChannel(this.record)||"
}, },
// Make channels we dont have access to be the same level as normal ones // Make channels we dont have access to be the same level as normal ones
@ -334,12 +334,12 @@ export default definePlugin({
replacement: [ replacement: [
{ {
// Remove the divider and the open chat button for the HiddenChannelLockScreen // 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)&&` replace: (m, channel, inCall) => `${m}${inCall}||!$self.isHiddenChannel(${channel},true)&&`
}, },
{ {
// Remove invite users button for the HiddenChannelLockScreen // 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))&&` replace: (m, channel, inCall) => `${m}(${inCall}||!$self.isHiddenChannel(${channel},true))&&`
}, },
] ]