fix(ui): save play mode for player (#3315)
* fix(ui): save play mode for player - 3019 * redux * redux
This commit is contained in:
@@ -16,7 +16,13 @@ import useCurrentTheme from '../themes/useCurrentTheme'
|
||||
import config from '../config'
|
||||
import useStyle from './styles'
|
||||
import AudioTitle from './AudioTitle'
|
||||
import { clearQueue, currentPlaying, setVolume, syncQueue } from '../actions'
|
||||
import {
|
||||
clearQueue,
|
||||
currentPlaying,
|
||||
setPlayMode,
|
||||
setVolume,
|
||||
syncQueue,
|
||||
} from '../actions'
|
||||
import PlayerToolbar from './PlayerToolbar'
|
||||
import { sendNotification } from '../utils'
|
||||
import subsonic from '../subsonic'
|
||||
@@ -93,6 +99,7 @@ const Player = () => {
|
||||
() => ({
|
||||
theme: playerTheme,
|
||||
bounds: 'body',
|
||||
playMode: playerState.mode,
|
||||
mode: 'full',
|
||||
loadAudioErrorPlayNext: false,
|
||||
autoPlayInitLoadPlayList: true,
|
||||
@@ -121,7 +128,7 @@ const Player = () => {
|
||||
),
|
||||
locale: locale(translate),
|
||||
}),
|
||||
[gainInfo, isDesktop, playerTheme, translate],
|
||||
[gainInfo, isDesktop, playerTheme, translate, playerState.mode],
|
||||
)
|
||||
|
||||
const options = useMemo(() => {
|
||||
@@ -294,6 +301,7 @@ const Player = () => {
|
||||
onAudioPlay={onAudioPlay}
|
||||
onAudioPlayTrackChange={onAudioPlayTrackChange}
|
||||
onAudioPause={onAudioPause}
|
||||
onPlayModeChange={(mode) => dispatch(setPlayMode(mode))}
|
||||
onAudioEnded={onAudioEnded}
|
||||
onCoverClick={onCoverClick}
|
||||
onBeforeDestroy={onBeforeDestroy}
|
||||
|
||||
Reference in New Issue
Block a user