fixed css config field

This commit is contained in:
Eugene Pankov 2021-05-13 17:06:11 +02:00
parent f76a5505ec
commit c956ee1183
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4

View file

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { Observable } from 'rxjs'
import { debounce } from 'utils-decorators/dist/cjs'
import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'
import { exec } from 'mz/child_process'
const fontManager = require('fontmanager-redux') // eslint-disable-line
@ -50,4 +51,12 @@ export class AppearanceSettingsTabComponent {
getPreviewFontFamily () {
return getCSSFontFamily(this.config.store)
}
@debounce(500)
saveConfiguration (requireRestart?: boolean) {
this.config.save()
if (requireRestart) {
this.config.requestRestart()
}
}
}