From 5216bcca1eca1b79a5a397e2128414ef653daee7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 3 Nov 2024 15:47:19 -0300 Subject: [PATCH] Fix settings & updater for Canary --- src/plugins/_core/settings.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 329c389c4..ffaea15bc 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -57,7 +57,7 @@ export default definePlugin({ ] }, { - find: "Messages.ACTIVITY_SETTINGS", + find: ".SEARCH_NO_RESULTS&&0===", replacement: [ { match: /(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/, @@ -148,13 +148,17 @@ export default definePlugin({ if (!header) return; - const names = { - top: i18n.Messages.USER_SETTINGS, - aboveNitro: i18n.Messages.BILLING_SETTINGS, - belowNitro: i18n.Messages.APP_SETTINGS, - aboveActivity: i18n.Messages.ACTIVITY_SETTINGS - }; - return header === names[settingsLocation]; + try { + const names = { + top: i18n.Messages.USER_SETTINGS, + aboveNitro: i18n.Messages.BILLING_SETTINGS, + belowNitro: i18n.Messages.APP_SETTINGS, + aboveActivity: i18n.Messages.ACTIVITY_SETTINGS + }; + return header === names[settingsLocation]; + } catch { + return firstChild === "PREMIUM"; + } }, patchedSettings: new WeakSet(),