From 904f51fb2859db79a1b8bca7241a8cb67e637300 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 21 Apr 2022 11:50:05 +0100 Subject: [PATCH] [Updater > Module] Defer discord_voice install into MainWindow --- src/mainWindow.js | 1 + src/updater/moduleUpdater.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainWindow.js b/src/mainWindow.js index 2f764f1..5c7d61b 100644 --- a/src/mainWindow.js +++ b/src/mainWindow.js @@ -51,6 +51,7 @@ document.body.appendChild(el); openasar = {}; // Define global for any mods which want to know / etc +DiscordNative.nativeModules.ensureModule('discord_voice'); // Ensure discord_voice to generally prevent corruption message / broken VC, also for deferring for fresh start setInterval(() => { // Try init themesync try { diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index 2ea28e5..014057b 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -49,7 +49,7 @@ exports.init = (endpoint, { releaseChannel, version }) => { try { installed = JSON.parse(fs.readFileSync(manifestPath)); } catch { - for (const m of [ 'desktop_core', 'utils', 'voice' ]) { // Ignore actual bootstrap manifest and choose our own core 3, others are installed as/when needed + for (const m of [ 'desktop_core', 'utils' ]) { // Ignore actual bootstrap manifest and choose our own core 2, others are deferred installed['discord_' + m] = { installedVersion: 0 }; // Set initial version as 0 } }