From bd94cf74c93644f1e2ba4e6d61acd1cee28a6a05 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 21 Apr 2022 11:28:54 +0100 Subject: [PATCH] [Updater > Module] Defer discord_voice install --- src/mainWindow.js | 2 +- src/updater/moduleUpdater.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mainWindow.js b/src/mainWindow.js index 2f764f1..893ec28 100644 --- a/src/mainWindow.js +++ b/src/mainWindow.js @@ -51,7 +51,7 @@ document.body.appendChild(el); openasar = {}; // Define global for any mods which want to know / etc - +DiscordNative.nativeModules.ensureModule('discord_voice'); setInterval(() => { // Try init themesync try { themesync(); diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index c28b625..fca7198 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -3,7 +3,6 @@ const fs = require('fs'); const mkdirp = require('mkdirp'); const Module = require('module'); const { execFile } = require('child_process'); -const { Readable, Writable } = require('stream'); const zlib = require('zlib'); const paths = require('../paths'); @@ -51,7 +50,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 3, others are installed as/when needed installed['discord_' + m] = { installedVersion: 0 }; // Set initial version as 0 } }