mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
Disable window throttling at the Chromium layer, Electron backgroundThrottling is broken #1467
This commit is contained in:
parent
8b6abc979a
commit
03dd94596c
1 changed files with 9 additions and 3 deletions
|
@ -260,6 +260,11 @@ export default class Application extends EventEmitter {
|
||||||
setupJavaScriptArguments() {
|
setupJavaScriptArguments() {
|
||||||
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
|
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
|
||||||
app.commandLine.appendSwitch('js-flags', '--harmony');
|
app.commandLine.appendSwitch('js-flags', '--harmony');
|
||||||
|
|
||||||
|
// BG TODO: This is required because `webPreferences.backgroundThrottling` is
|
||||||
|
// broken. Will be fixed by https://github.com/electron/electron/pull/20239.
|
||||||
|
// Note this impacts all windows so we should change it back when possible.
|
||||||
|
app.commandLine.appendSwitch('disable-background-timer-throttling');
|
||||||
}
|
}
|
||||||
|
|
||||||
openWindowsForTokenState() {
|
openWindowsForTokenState() {
|
||||||
|
@ -394,13 +399,14 @@ export default class Application extends EventEmitter {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on('application:view-getting-started', () => {
|
this.on('application:view-getting-started', () => {
|
||||||
const helpUrl = 'https://foundry376.zendesk.com/hc/en-us/sections/115000521592-Getting-Started';
|
const helpUrl =
|
||||||
|
'https://foundry376.zendesk.com/hc/en-us/sections/115000521592-Getting-Started';
|
||||||
shell.openExternal(helpUrl);
|
shell.openExternal(helpUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.on('application:view-faq', () => {
|
this.on('application:view-faq', () => {
|
||||||
const helpUrl = 'https://foundry376.zendesk.com/hc/en-us/sections/115000521892-Frequently-Asked-Questions';
|
const helpUrl =
|
||||||
|
'https://foundry376.zendesk.com/hc/en-us/sections/115000521892-Frequently-Asked-Questions';
|
||||||
shell.openExternal(helpUrl);
|
shell.openExternal(helpUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue