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

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);

View file

@ -88,19 +88,6 @@ export default class VectorBasePlatform extends BasePlatform {
this._updateFavicon();
}
supportsAutoLaunch() {
return false;
}
// XXX: Surely this should be a setting like any other?
async getAutoLaunchEnabled() {
return false;
}
async setAutoLaunchEnabled(enabled) {
throw new Error("Unimplemented");
}
/**
* Begin update polling, if applicable
*/