Merge pull request #16781 from vector-im/gsouquet-warn-before-exit

Add user settings for warn before exit
pull/16814/head
Germain 2021-03-29 12:07:59 +01:00 committed by GitHub
commit 47486e84dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -399,6 +399,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this._ipcCall('setAutoLaunchEnabled', enabled); return this._ipcCall('setAutoLaunchEnabled', enabled);
} }
supportsWarnBeforeExit(): boolean {
return true;
}
async shouldWarnBeforeExit(): Promise<boolean> {
return this._ipcCall('shouldWarnBeforeExit');
}
async setWarnBeforeExit(enabled: boolean): Promise<void> {
return this._ipcCall('setWarnBeforeExit', enabled);
}
supportsAutoHideMenuBar(): boolean { supportsAutoHideMenuBar(): boolean {
// This is irelevant on Mac as Menu bars don't live in the app window // This is irelevant on Mac as Menu bars don't live in the app window
return !isMac; return !isMac;