Remove autoreload option

This commit is contained in:
Zack Rauen 2022-08-07 17:26:47 -04:00
parent 69e17b1dbd
commit ea1820143a
4 changed files with 2 additions and 29 deletions

View File

@ -36,10 +36,6 @@
"name": "Show Addon Errors", "name": "Show Addon Errors",
"note": "Shows a modal with plugin/theme errors" "note": "Shows a modal with plugin/theme errors"
}, },
"autoReload": {
"name": "Automatic Loading",
"note": "Automatically loads, reloads, and unloads plugins and themes"
},
"editAction": { "editAction": {
"name": "Edit Action", "name": "Edit Action",
"note": "Where plugins & themes appear when editing", "note": "Where plugins & themes appear when editing",

View File

@ -36,9 +36,6 @@ export default class AddonManager {
get addonFolder() {return "";} get addonFolder() {return "";}
get language() {return "";} get language() {return "";}
get prefix() {return "addon";} get prefix() {return "addon";}
get collection() {return "settings";}
get category() {return "addons";}
get id() {return "autoReload";}
emit(event, ...args) {return Events.emit(`${this.prefix}-${event}`, ...args);} emit(event, ...args) {return Events.emit(`${this.prefix}-${event}`, ...args);}
constructor() { constructor() {
@ -49,10 +46,6 @@ export default class AddonManager {
} }
initialize() { initialize() {
Settings.on(this.collection, this.category, this.id, (enabled) => {
if (enabled) this.watchAddons();
else this.unwatchAddons();
});
return this.loadAllAddons(); return this.loadAllAddons();
} }
@ -312,7 +305,7 @@ export default class AddonManager {
} }
this.saveState(); this.saveState();
if (Settings.get(this.collection, this.category, this.id)) this.watchAddons(); this.watchAddons();
return errors; return errors;
} }

View File

@ -518,22 +518,6 @@ BdApi.Themes = new AddonAPI(ThemeManager);
* @summary {@link Patcher} is a utility class for modifying existing functions. * @summary {@link Patcher} is a utility class for modifying existing functions.
*/ */
BdApi.Patcher = { BdApi.Patcher = {
/**
* This function creates a version of itself that binds all `caller` parameters to your ID.
* @param {string} id ID to use for all subsequent calls
* @returns {Patcher} An instance of this patcher with all functions bound to your ID
*/
bind(id) {
return {
patch: BdApi.Patcher.patch.bind(BdApi.Patcher, id),
before: BdApi.Patcher.before.bind(BdApi.Patcher, id),
instead: BdApi.Patcher.instead.bind(BdApi.Patcher, id),
after: BdApi.Patcher.after.bind(BdApi.Patcher, id),
getPatchesByCaller: BdApi.Patcher.getPatchesByCaller.bind(BdApi.Patcher, id),
unpatchAll: BdApi.Patcher.unpatchAll.bind(BdApi.Patcher, id),
};
},
/** /**
* This method patches onto another function, allowing your code to run beforehand. * This method patches onto another function, allowing your code to run beforehand.
* Using this, you are also able to modify the incoming arguments before the original method is run. * Using this, you are also able to modify the incoming arguments before the original method is run.

View File

@ -127,7 +127,7 @@ export default class Modals {
static showChangelogModal(options = {}) { static showChangelogModal(options = {}) {
const ModalStack = WebpackModules.getByProps("push", "update", "pop", "popWithKey"); const ModalStack = WebpackModules.getByProps("push", "update", "pop", "popWithKey");
const ChangelogClasses = WebpackModules.getByProps("fixed", "improved"); const ChangelogClasses = WebpackModules.getByProps("fixed", "improved");
const TextElement = WebpackModules.findByDisplayName("Text"); const TextElement = WebpackModules.getByDisplayName("LegacyText") || WebpackModules.getByProps("Colors", "Sizes");
const FlexChild = WebpackModules.getByProps("Child"); const FlexChild = WebpackModules.getByProps("Child");
const Titles = WebpackModules.getByProps("Tags", "default"); const Titles = WebpackModules.getByProps("Tags", "default");
const Changelog = WebpackModules.getModule(m => m.defaultProps && m.defaultProps.selectable == false); const Changelog = WebpackModules.getModule(m => m.defaultProps && m.defaultProps.selectable == false);