Feature flag it!

This commit is contained in:
Sergio Padrino 2022-10-25 10:45:35 +02:00
parent 58554a6182
commit 22ca426f04
2 changed files with 7 additions and 0 deletions

View file

@ -112,3 +112,8 @@ export function enableSubmoduleDiff(): boolean {
export function enableStartingPullRequests(): boolean {
return enableBetaFeatures()
}
/** Should we enable mechanism to prevent closing while the app is updating? */
export function enablePreventClosingWhileUpdating(): boolean {
return enableBetaFeatures()
}

View file

@ -26,6 +26,7 @@ import {
terminateDesktopNotifications,
} from './notifications'
import { addTrustedIPCSender } from './trusted-ipc-sender'
import { enablePreventClosingWhileUpdating } from '../lib/feature-flag'
export class AppWindow {
private window: Electron.BrowserWindow
@ -114,6 +115,7 @@ export class AppWindow {
// app is updating, we will prevent the window from closing only when the
// app is also quitting.
if (
enablePreventClosingWhileUpdating() &&
(!__DARWIN__ || quitting) &&
!quittingEvenIfUpdating &&
this.isDownloadingUpdate