From 1d79f97a7acdd91912d4a9186c41da0ed8f999ca Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 25 Mar 2021 14:15:34 +0000 Subject: [PATCH] Add user settings for warn before exit --- src/vector/platform/ElectronPlatform.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index ab45fd7d97..74317e77d0 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -399,6 +399,18 @@ export default class ElectronPlatform extends VectorBasePlatform { return this._ipcCall('setAutoLaunchEnabled', enabled); } + supportsWarnBeforeExit(): boolean { + return true; + } + + async shouldWarnBeforeExit(): Promise { + return this._ipcCall('shouldWarnBeforeExit'); + } + + async setWarnBeforeExit(enabled: boolean): Promise { + return this._ipcCall('setWarnBeforeExit', enabled); + } + supportsAutoHideMenuBar(): boolean { // This is irelevant on Mac as Menu bars don't live in the app window return !isMac;