From ea1820143a348d6e7d624eb60d845544ee79ff95 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Sun, 7 Aug 2022 17:26:47 -0400 Subject: [PATCH] Remove autoreload option --- assets/locales/en-us.json | 4 ---- renderer/src/modules/addonmanager.js | 9 +-------- renderer/src/modules/pluginapi.js | 16 ---------------- renderer/src/ui/modals.js | 2 +- 4 files changed, 2 insertions(+), 29 deletions(-) diff --git a/assets/locales/en-us.json b/assets/locales/en-us.json index 5b1269d4..71a5d6d3 100644 --- a/assets/locales/en-us.json +++ b/assets/locales/en-us.json @@ -36,10 +36,6 @@ "name": "Show Addon Errors", "note": "Shows a modal with plugin/theme errors" }, - "autoReload": { - "name": "Automatic Loading", - "note": "Automatically loads, reloads, and unloads plugins and themes" - }, "editAction": { "name": "Edit Action", "note": "Where plugins & themes appear when editing", diff --git a/renderer/src/modules/addonmanager.js b/renderer/src/modules/addonmanager.js index d0f5207b..69de1acd 100644 --- a/renderer/src/modules/addonmanager.js +++ b/renderer/src/modules/addonmanager.js @@ -36,9 +36,6 @@ export default class AddonManager { get addonFolder() {return "";} get language() {return "";} 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);} constructor() { @@ -49,10 +46,6 @@ export default class AddonManager { } initialize() { - Settings.on(this.collection, this.category, this.id, (enabled) => { - if (enabled) this.watchAddons(); - else this.unwatchAddons(); - }); return this.loadAllAddons(); } @@ -312,7 +305,7 @@ export default class AddonManager { } this.saveState(); - if (Settings.get(this.collection, this.category, this.id)) this.watchAddons(); + this.watchAddons(); return errors; } diff --git a/renderer/src/modules/pluginapi.js b/renderer/src/modules/pluginapi.js index 782388d7..efe95e12 100644 --- a/renderer/src/modules/pluginapi.js +++ b/renderer/src/modules/pluginapi.js @@ -518,22 +518,6 @@ BdApi.Themes = new AddonAPI(ThemeManager); * @summary {@link Patcher} is a utility class for modifying existing functions. */ 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. * Using this, you are also able to modify the incoming arguments before the original method is run. diff --git a/renderer/src/ui/modals.js b/renderer/src/ui/modals.js index d361f654..77ec65c7 100644 --- a/renderer/src/ui/modals.js +++ b/renderer/src/ui/modals.js @@ -127,7 +127,7 @@ export default class Modals { static showChangelogModal(options = {}) { const ModalStack = WebpackModules.getByProps("push", "update", "pop", "popWithKey"); 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 Titles = WebpackModules.getByProps("Tags", "default"); const Changelog = WebpackModules.getModule(m => m.defaultProps && m.defaultProps.selectable == false);