Signal-Desktop/app/window_state.ts

33 lines
641 B
TypeScript
Raw Normal View History

2020-10-30 20:34:04 +00:00
// Copyright 2017-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
let shouldQuitFlag = false;
export function markShouldQuit(): void {
shouldQuitFlag = true;
}
export function shouldQuit(): boolean {
return shouldQuitFlag;
}
2021-10-01 18:49:59 +00:00
let isReadyForShutdown = false;
export function markReadyForShutdown(): void {
isReadyForShutdown = true;
}
export function readyForShutdown(): boolean {
return isReadyForShutdown;
}
let hasRequestedShutdown = false;
export function markRequestedShutdown(): void {
hasRequestedShutdown = true;
}
export function requestedShutdown(): boolean {
return hasRequestedShutdown;
}