Store/Settings: Handle `defaultVolume`'s side effects in the module

This commit is contained in:
Svallinn 2021-06-11 02:33:36 +01:00
parent b0f973b76a
commit 55a25dc1ea
No known key found for this signature in database
GPG Key ID: 09FB527F34037CCA
1 changed files with 7 additions and 1 deletions

View File

@ -182,7 +182,6 @@ const state = {
proxyVideos: false,
defaultTheatreMode: false,
defaultInterval: 5,
defaultVolume: 1,
defaultPlayback: 1,
defaultVideoFormat: 'dash',
defaultQuality: '720',
@ -213,6 +212,13 @@ const state = {
}
const stateWithSideEffects = {
defaultVolume: {
defaultValue: 1,
sideEffectsHandler: (_, value) => {
sessionStorage.setItem('volume', value)
}
},
uiScale: {
defaultValue: 100,
sideEffectsHandler: ({ state: { usingElectron } }, value) => {