[Bootstrap] Override Core's splash ready (see comment)
This commit is contained in:
parent
f36174e55b
commit
79a36dfb4b
1 changed files with 2 additions and 9 deletions
11
src/bootstrap.js
vendored
11
src/bootstrap.js
vendored
|
@ -40,15 +40,6 @@ const startCore = () => {
|
|||
desktopCore = requireNative('discord_desktop_core');
|
||||
log('Bootstrap', 'Required desktop_core:', desktopCore);
|
||||
|
||||
/* const electronPath = require.resolve('electron'); // Patch webapp host version to suffix -openasar
|
||||
const originalVersion = require.cache[electronPath].exports.app.getVersion();
|
||||
require.cache[electronPath].exports.app.getVersion = function() {
|
||||
const inDiscordNative = (new Error()).stack.includes('discord_native');
|
||||
if (!inDiscordNative) return originalVersion;
|
||||
|
||||
return originalVersion + '-openasar';
|
||||
}; */
|
||||
|
||||
desktopCore.startup({
|
||||
paths,
|
||||
splashScreen,
|
||||
|
@ -77,6 +68,8 @@ const startCore = () => {
|
|||
const bw = BrowserWindow.fromId(global.mainWindowId);
|
||||
|
||||
bw.webContents.on('dom-ready', () => {
|
||||
splashScreen.pageReady(); // Override Core's pageReady with our own on dom-ready to show main window earlier
|
||||
|
||||
log('MainWindowInject', 'dom-ready triggered, injecting JS');
|
||||
|
||||
let injectJs = readFileSync(join(__dirname, 'mainWindowInject.js'), 'utf8');
|
||||
|
|
Loading…
Reference in a new issue