import { MainWindowState } from '../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../models/mainwindow/navigation/navigation-state' ; import { PreferencesService } from '../../../preferences.service' ; import { GenericPreferencesUpdateEvent } from '../events/generic-preferences-update-event' ; import { Processor } from './processor' ; export class GenericPreferencesUpdateProcessor implements Processor { constructor ( private readonly prefs ) { } public async process ( event , currentState , stateHistory , navigationState ) { const prefs = await this . prefs . getPreferences ( ) ; const newPrefs = event . patcher ( prefs ) ; await this . prefs . savePreferences ( newPrefs ) ; return [ null , null ] ; } }