mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-08 02:55:09 +00:00
Fixed default settings values
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { ElectronService } from './electron.service'
|
import { ElectronService } from './electron.service'
|
||||||
import { Settings } from 'src/electron/shared/Settings'
|
import { Settings, defaultSettings } from 'src/electron/shared/Settings'
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -54,7 +54,7 @@ export class SettingsService {
|
|||||||
|
|
||||||
// Individual getters/setters
|
// Individual getters/setters
|
||||||
get libraryDirectory() {
|
get libraryDirectory() {
|
||||||
return this.settings == undefined ? '' : this.settings.libraryPath
|
return this.settings == undefined ? defaultSettings.libraryPath : this.settings.libraryPath
|
||||||
}
|
}
|
||||||
set libraryDirectory(newValue: string) {
|
set libraryDirectory(newValue: string) {
|
||||||
this.settings.libraryPath = newValue
|
this.settings.libraryPath = newValue
|
||||||
@@ -62,7 +62,7 @@ export class SettingsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get theme() {
|
get theme() {
|
||||||
return this.settings == undefined ? '' : this.settings.theme
|
return this.settings == undefined ? defaultSettings.theme : this.settings.theme
|
||||||
}
|
}
|
||||||
set theme(newValue: string) {
|
set theme(newValue: string) {
|
||||||
this.settings.theme = newValue
|
this.settings.theme = newValue
|
||||||
@@ -71,7 +71,7 @@ export class SettingsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get rateLimitDelay() {
|
get rateLimitDelay() {
|
||||||
return this.settings == undefined ? NaN : this.settings.rateLimitDelay
|
return this.settings == undefined ? defaultSettings.rateLimitDelay : this.settings.rateLimitDelay
|
||||||
}
|
}
|
||||||
set rateLimitDelay(delay: number) {
|
set rateLimitDelay(delay: number) {
|
||||||
this.settings.rateLimitDelay = delay
|
this.settings.rateLimitDelay = delay
|
||||||
|
|||||||
Reference in New Issue
Block a user