Skip to content

Commit

Permalink
Resolve default setting error for xstate
Browse files Browse the repository at this point in the history
  • Loading branch information
mauwaz committed Mar 14, 2024
1 parent 1881dd8 commit c0c467e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/redux/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const ReduxProvider = ({ children, locale }) => {
const reciterId =
userPreferences[PreferenceGroup.AUDIO]?.reciter ||
audioService.getSnapshot().context.reciterId;
audioService.send({ type: 'SET_INITIAL_CONTEXT', playbackRate, reciterId });
const { volume } = audioService.getSnapshot().context;
audioService.send({ type: 'SET_INITIAL_CONTEXT', playbackRate, reciterId, volume });
// eslint-disable-next-line no-empty
} catch (error) {}
}
Expand Down
1 change: 1 addition & 0 deletions src/redux/defaultSettings/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const AUDIO_INITIAL_STATE: AudioState = {
export const DEFAULT_XSTATE_INITIAL_STATE = {
playbackRate: 1,
reciterId: DEFAULT_RECITER.id,
volume: 1,
};

const NOTIFICATIONS_INITIAL_STATE: NotificationsState = {
Expand Down

0 comments on commit c0c467e

Please sign in to comment.