From 3eede224d491c42f83bea04c759dd03b59510808 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sat, 27 Apr 2024 10:47:45 +0800 Subject: [PATCH] Update listeners to accomodate for redirects removed unused tabs module --- scripts/GUI/entrypoints/manager.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/GUI/entrypoints/manager.js b/scripts/GUI/entrypoints/manager.js index bc7815d..1203f18 100644 --- a/scripts/GUI/entrypoints/manager.js +++ b/scripts/GUI/entrypoints/manager.js @@ -1,6 +1,5 @@ // Manage all entries. -import {read} from '../../secretariat.js'; import Tabs from "/scripts/GUI/tabs.js"; import MenuEntry from "./menu.js"; import ManagedSidebar from "./sidebar.js"; @@ -9,9 +8,21 @@ import check from "/scripts/external/check.js"; export default class EntryManager { constructor () { + // Initialize the entries. this.instances = {}; this.instances.menu = new MenuEntry(); + + // Initialize the managed sidebar to be called. + ManagedSidebar.manage(); + + // Add the action listeners. + this.#listen(); + } + + /* Add the action listeners when running this. */ + #listen() { Tabs.addActionListener(`onActivated`, (data) => {this.onRefresh()}); + Tabs.addActionListener(`onUpdated`, (data) => {this.onRefresh()}); } async onRefresh() { @@ -30,14 +41,6 @@ export default class EntryManager { enable () { this.instances.menu.enable(); IconIndicator.enable(); - - // Open the side panel, if supported. - read([`settings`,`behavior`,`autoOpen`]).then((result) => { - result = (result == null) ? false : result; - if (result) { - new ManagedSidebar(); - } - }); } /*