@@ -54,7 +54,7 @@ import {
5454} from '../../contexts' ;
5555import {
5656 AudioPlayerContextProps ,
57- WithAudioPlayback ,
57+ AudioPlayerProvider ,
5858} from '../../contexts/audioPlayerContext/AudioPlayerContext' ;
5959import { ChannelContextValue , ChannelProvider } from '../../contexts/channelContext/ChannelContext' ;
6060import type { UseChannelStateValue } from '../../contexts/channelsStateContext/useChannelState' ;
@@ -1667,13 +1667,6 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
16671667 }
16681668 } ) ;
16691669
1670- const audioPlayerProviderProps = useMemo < AudioPlayerContextProps > (
1671- ( ) => ( {
1672- allowConcurrentAudioPlayback,
1673- } ) ,
1674- [ allowConcurrentAudioPlayback ] ,
1675- ) ;
1676-
16771670 const attachmentPickerProps = useMemo (
16781671 ( ) => ( {
16791672 AttachmentPickerBottomSheetHandle,
@@ -1974,6 +1967,11 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
19741967 typing : channelState . typing ?? { } ,
19751968 } ) ;
19761969
1970+ const audioPlayerContext = useMemo < AudioPlayerContextProps > (
1971+ ( ) => ( { allowConcurrentAudioPlayback } ) ,
1972+ [ allowConcurrentAudioPlayback ] ,
1973+ ) ;
1974+
19771975 const messageComposerContext = useMemo (
19781976 ( ) => ( { channel, thread, threadInstance } ) ,
19791977 [ channel , thread , threadInstance ] ,
@@ -2012,12 +2010,12 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
20122010 < AttachmentPickerProvider value = { attachmentPickerContext } >
20132011 < MessageComposerProvider value = { messageComposerContext } >
20142012 < MessageInputProvider value = { inputMessageInputContext } >
2015- < WithAudioPlayback props = { audioPlayerProviderProps } >
2013+ < AudioPlayerProvider value = { audioPlayerContext } >
20162014 < View style = { { height : '100%' } } > { children } </ View >
20172015 { ! disableAttachmentPicker && (
20182016 < AttachmentPicker ref = { bottomSheetRef } { ...attachmentPickerProps } />
20192017 ) }
2020- </ WithAudioPlayback >
2018+ </ AudioPlayerProvider >
20212019 </ MessageInputProvider >
20222020 </ MessageComposerProvider >
20232021 </ AttachmentPickerProvider >
0 commit comments