Skip to content

Commit

Permalink
Fix settings & updater for Canary
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckyz committed Nov 3, 2024
1 parent e7e298d commit 5216bcc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/plugins/_core/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)/,
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 5216bcc

Please sign in to comment.