Skip to content

Commit 4baf8ae

Browse files
authored
[CLNP-8097]Fixed a bug where the input field disappeared when a new message arrived while composing a quote message (#1398)
Fixes [CLNP-8097](https://sendbird.atlassian.net/browse/CLNP-8097) The issue occurs because actions.setCurrentChannel(), which is called when a message is received or a typing start event is triggered, resets quoteMessage to null, causing the input field to disappear. ### Changelogs - Fixed a bug where the input field disappeared when a new message arrived while composing a quote message ### Checklist Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If unsure, ask the members. This is a reminder of what we look for before merging your code. - [x] **All tests pass locally with my changes** - [ ] **I have added tests that prove my fix is effective or that my feature works** - [ ] **Public components / utils / props are appropriately exported** - [ ] I have added necessary documentation (if appropriate) [CLNP-8097]: https://sendbird.atlassian.net/browse/CLNP-8097?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 016ff34 commit 4baf8ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/GroupChannel/context/hooks/useGroupChannel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const useGroupChannel = () => {
181181
...state,
182182
currentChannel: channel,
183183
fetchChannelError: null,
184-
quoteMessage: null,
184+
quoteMessage: state.currentChannel?.url === channel?.url ? state.quoteMessage : null,
185185
animatedMessageId: null,
186186
nicknamesMap: channel ? new Map(
187187
channel.members.map(({ userId, nickname }) => [userId, nickname]),

0 commit comments

Comments
 (0)