Skip to content

Commit bd562d0

Browse files
authored
feat: apply groupChannel.enableTypingIndicator config flag (#617)
Applid `group_channel.channel.channe.enable_typing_indicator` config to ChannelUI component
1 parent 9cca2a6 commit bd562d0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/lib/Sendbird.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ const SendbirdSDK = ({
316316
// Remote configs set from dashboard by UIKit feature configuration
317317
groupChannel: {
318318
enableOgtag: configs.groupChannel.channel.enableOgtag,
319+
enableTypingIndicator: configs.groupChannel.channel.enableTypingIndicator,
319320
},
320321
openChannel: {
321322
enableOgtag: configs.openChannel.channel.enableOgtag,

src/lib/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export interface SendBirdStateConfig {
107107
// Remote configs set from dashboard by UIKit feature configuration
108108
groupChannel: {
109109
enableOgtag: SBUConfig['groupChannel']['channel']['enableOgtag'];
110+
enableTypingIndicator: SBUConfig['groupChannel']['channel']['enableTypingIndicator'];
110111
},
111112
openChannel: {
112113
enableOgtag: SBUConfig['openChannel']['channel']['enableOgtag'];

src/modules/Channel/components/ChannelUI/index.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ const ChannelUI: React.FC<ChannelUIProps> = ({
122122
}
123123
<div className="sendbird-conversation__footer__typing-indicator">
124124
{
125-
renderTypingIndicator?.() || (
126-
<TypingIndicator />
127-
)
125+
renderTypingIndicator?.()
126+
|| globalStore?.config?.groupChannel?.enableTypingIndicator && (
127+
<TypingIndicator />
128+
)
128129
}
129130
{
130131
!isOnline && (

0 commit comments

Comments
 (0)