Enable background throttling for alpha users
This commit is contained in:
parent
28940d1a34
commit
0cf28344a6
1 changed files with 5 additions and 8 deletions
13
app/main.ts
13
app/main.ts
|
@ -73,7 +73,7 @@ import { createTemplate } from './menu';
|
||||||
import { installFileHandler, installWebHandler } from './protocol_filter';
|
import { installFileHandler, installWebHandler } from './protocol_filter';
|
||||||
import * as OS from '../ts/OS';
|
import * as OS from '../ts/OS';
|
||||||
import { createBrowserWindow } from '../ts/util/createBrowserWindow';
|
import { createBrowserWindow } from '../ts/util/createBrowserWindow';
|
||||||
import { isProduction } from '../ts/util/version';
|
import { isProduction, isAlpha } from '../ts/util/version';
|
||||||
import {
|
import {
|
||||||
isSgnlHref,
|
isSgnlHref,
|
||||||
isCaptchaHref,
|
isCaptchaHref,
|
||||||
|
@ -117,6 +117,8 @@ const development =
|
||||||
getEnvironment() === Environment.Development ||
|
getEnvironment() === Environment.Development ||
|
||||||
getEnvironment() === Environment.Staging;
|
getEnvironment() === Environment.Staging;
|
||||||
|
|
||||||
|
const isThrottlingEnabled = development || isAlpha(app.getVersion());
|
||||||
|
|
||||||
const enableCI = config.get<boolean>('enableCI');
|
const enableCI = config.get<boolean>('enableCI');
|
||||||
|
|
||||||
const preventDisplaySleepService = new PreventDisplaySleepService(
|
const preventDisplaySleepService = new PreventDisplaySleepService(
|
||||||
|
@ -479,10 +481,7 @@ async function createWindow() {
|
||||||
),
|
),
|
||||||
nativeWindowOpen: true,
|
nativeWindowOpen: true,
|
||||||
spellcheck: await getSpellCheckSetting(),
|
spellcheck: await getSpellCheckSetting(),
|
||||||
// We are evaluating background throttling in development. If we decide to
|
backgroundThrottling: isThrottlingEnabled,
|
||||||
// move forward, we can remove this line (as `backgroundThrottling` is true by
|
|
||||||
// default).
|
|
||||||
backgroundThrottling: development,
|
|
||||||
enablePreferredSizeMode: true,
|
enablePreferredSizeMode: true,
|
||||||
},
|
},
|
||||||
icon: windowIcon,
|
icon: windowIcon,
|
||||||
|
@ -774,9 +773,7 @@ ipc.on('set-is-call-active', (_event, isCallActive) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are evaluating background throttling in development. If we decide to move
|
if (!isThrottlingEnabled) {
|
||||||
// forward, we can remove this check.
|
|
||||||
if (!development) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue