MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / setActiveApp

Function setActiveApp

src/sidebarApps/index.js:174–184  ·  view source on GitHub ↗

* Activates the given sidebar app and deactivates all others. * @param {string} id * @returns {void}

(id)

Source from the content-addressed store, hash-verified

172 * @returns {void}
173 */
174function setActiveApp(id) {
175 const app = apps.find((app) => app.id === id);
176 if (!app) return;
177
178 currentSection = id;
179 localStorage.setItem(SIDEBAR_APPS_LAST_SECTION, id);
180
181 for (const currentApp of apps) {
182 currentApp.active = currentApp.id === id;
183 }
184}
185
186export default {
187 init,

Callers 4

addFunction · 0.85
removeFunction · 0.85
ensureActiveAppFunction · 0.85
onclickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected