Skip to content

Commit

Permalink
fix: load core plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
pylixonly committed Oct 9, 2024
1 parent ad65247 commit ed52f33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { removeFile, writeFile } from "@lib/api/native/fs";
import { isPyonLoader, isThemeSupported } from "@lib/api/native/loader";
import { FileManager } from "@lib/api/native/modules";
import { updateFonts } from "@lib/fonts";
import { initPlugins } from "@lib/plugins";
import { initPlugins, registerCorePlugins } from "@lib/plugins";
import { initThemes, patchChatBackground } from "@lib/themes";
import { logger } from "@lib/utils/logger";
import initSafeMode from "@ui/safeMode";
Expand Down Expand Up @@ -46,7 +46,8 @@ export default async () => {
initFetchI18nStrings(),
initSettings(),
initFixes(),
initSafeMode()
initSafeMode(),
registerCorePlugins()
]).then(
// Push them all to unloader
u => u.forEach(f => f && lib.unload.push(f))
Expand Down
9 changes: 1 addition & 8 deletions src/lib/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export function stopPlugin(id: string) {
pluginInstances.delete(id);
}

export async function checkAndRegisterUpdates() {
export async function registerCorePlugins() {
await awaitStorage(pluginRepositories, pluginSettings);

const corePlugins = getCorePlugins();
Expand All @@ -366,13 +366,6 @@ export async function checkAndRegisterUpdates() {
manifestToId.set(instance.manifest, id);
corePluginInstances.set(id, instance);
}

// await updateRepository(OFFICIAL_PLUGINS_REPO_URL);
// await Promise.allSettled(Object.keys(pluginRepositories).map(async repo => {
// if (repo !== OFFICIAL_PLUGINS_REPO_URL) {
// await updateRepository(repo);
// }
// }));
}

/**
Expand Down

0 comments on commit ed52f33

Please sign in to comment.