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 * as OS from '../ts/OS';
|
||||
import { createBrowserWindow } from '../ts/util/createBrowserWindow';
|
||||
import { isProduction } from '../ts/util/version';
|
||||
import { isProduction, isAlpha } from '../ts/util/version';
|
||||
import {
|
||||
isSgnlHref,
|
||||
isCaptchaHref,
|
||||
|
@ -117,6 +117,8 @@ const development =
|
|||
getEnvironment() === Environment.Development ||
|
||||
getEnvironment() === Environment.Staging;
|
||||
|
||||
const isThrottlingEnabled = development || isAlpha(app.getVersion());
|
||||
|
||||
const enableCI = config.get<boolean>('enableCI');
|
||||
|
||||
const preventDisplaySleepService = new PreventDisplaySleepService(
|
||||
|
@ -479,10 +481,7 @@ async function createWindow() {
|
|||
),
|
||||
nativeWindowOpen: true,
|
||||
spellcheck: await getSpellCheckSetting(),
|
||||
// We are evaluating background throttling in development. If we decide to
|
||||
// move forward, we can remove this line (as `backgroundThrottling` is true by
|
||||
// default).
|
||||
backgroundThrottling: development,
|
||||
backgroundThrottling: isThrottlingEnabled,
|
||||
enablePreferredSizeMode: true,
|
||||
},
|
||||
icon: windowIcon,
|
||||
|
@ -774,9 +773,7 @@ ipc.on('set-is-call-active', (_event, isCallActive) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// We are evaluating background throttling in development. If we decide to move
|
||||
// forward, we can remove this check.
|
||||
if (!development) {
|
||||
if (!isThrottlingEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue