Allow configuration of whether closing window closes or minimizes to tray

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2019-02-24 01:08:01 +00:00
parent 588030141b
commit 714570443d
4 changed files with 25 additions and 15 deletions
+13 -1
View File
@@ -182,10 +182,22 @@ export default class ElectronPlatform extends VectorBasePlatform {
return await this._ipcCall('getAutoLaunchEnabled');
}
async setAutoLaunchEnabled(enabled) {
async setAutoLaunchEnabled(enabled: boolean) {
return await this._ipcCall('setAutoLaunchEnabled', enabled);
}
supportsMinimizeToTray() {
return true;
}
async getMinimizeToTrayEnabled() {
return await this._ipcCall('getMinimizeToTrayEnabled');
}
async setMinimizeToTrayEnabled(enabled: boolean) {
return await this._ipcCall('setMinimizeToTrayEnabled', enabled);
}
async canSelfUpdate(): boolean {
const feedUrl = await this._ipcCall('getUpdateFeedUrl');
return Boolean(feedUrl);