Ensure settings are saved

This commit is contained in:
Hinton 2020-12-16 09:38:28 +01:00
parent 41e72b22b8
commit 22ddd8db60
1 changed files with 4 additions and 0 deletions

View File

@ -275,6 +275,7 @@ export class SettingsComponent implements OnInit {
async saveCloseToTray() {
if (this.requireEnableTray) {
this.enableTray = true;
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
}
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
@ -289,7 +290,9 @@ export class SettingsComponent implements OnInit {
if (confirm) {
this.startToTray = false;
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
this.enableCloseToTray = false;
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
} else {
this.enableTray = true;
}
@ -305,6 +308,7 @@ export class SettingsComponent implements OnInit {
async saveStartToTray() {
if (this.requireEnableTray) {
this.enableTray = true;
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
}
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);