Store/Settings: Handle `defaultVolume`'s side effects in the module
This commit is contained in:
parent
b0f973b76a
commit
55a25dc1ea
|
@ -182,7 +182,6 @@ const state = {
|
||||||
proxyVideos: false,
|
proxyVideos: false,
|
||||||
defaultTheatreMode: false,
|
defaultTheatreMode: false,
|
||||||
defaultInterval: 5,
|
defaultInterval: 5,
|
||||||
defaultVolume: 1,
|
|
||||||
defaultPlayback: 1,
|
defaultPlayback: 1,
|
||||||
defaultVideoFormat: 'dash',
|
defaultVideoFormat: 'dash',
|
||||||
defaultQuality: '720',
|
defaultQuality: '720',
|
||||||
|
@ -213,6 +212,13 @@ const state = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const stateWithSideEffects = {
|
const stateWithSideEffects = {
|
||||||
|
defaultVolume: {
|
||||||
|
defaultValue: 1,
|
||||||
|
sideEffectsHandler: (_, value) => {
|
||||||
|
sessionStorage.setItem('volume', value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
uiScale: {
|
uiScale: {
|
||||||
defaultValue: 100,
|
defaultValue: 100,
|
||||||
sideEffectsHandler: ({ state: { usingElectron } }, value) => {
|
sideEffectsHandler: ({ state: { usingElectron } }, value) => {
|
||||||
|
|
Loading…
Reference in New Issue