ShowHiddenChannels: Fix patch

This commit is contained in:
Nuckyz 2024-05-31 23:41:38 -03:00
parent d07e4c71b5
commit aa7eb77050
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 4 additions and 4 deletions

View file

@ -16,9 +16,8 @@ export default definePlugin({
{ {
find: '"call_ringing_beat"', find: '"call_ringing_beat"',
replacement: { replacement: {
// FIXME Remove === alternative when it hits stable match: /500!==\i\(\)\.random\(1,1e3\)/,
match: /500(!==|===)\i\(\)\.random\(1,1e3\)/, replace: "false",
replace: (_, predicate) => predicate === "!==" ? "false" : "true",
} }
}, },
], ],

View file

@ -73,8 +73,9 @@ export default definePlugin({
find: '"placeholder-channel-id"', find: '"placeholder-channel-id"',
replacement: [ replacement: [
// Remove the special logic for channels we don't have access to // Remove the special logic for channels we don't have access to
// FIXME Remove variable matcher from threadsIds when it hits stable
{ {
match: /if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/, match: /if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:(?:\[\]|\i)}}/,
replace: "" replace: ""
}, },
// 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