Skip to content

Commit 9668334

Browse files
committed
fix: throttle all other msg copies
1 parent 0ba18d3 commit 9668334

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ const ChannelWithContext = <
11901190
}
11911191

11921192
channel.state.addMessageSorted(updatedMessage, true);
1193-
copyMessagesStateFromChannel(channel);
1193+
copyMsgsStateFromChannel(channel);
11941194

11951195
if (thread && updatedMessage.parent_id) {
11961196
extraState.threadMessages = channel.state.threads[updatedMessage.parent_id] || [];
@@ -1205,7 +1205,7 @@ const ChannelWithContext = <
12051205
if (channel) {
12061206
channel.state.removeMessage(oldMessage);
12071207
channel.state.addMessageSorted(newMessage, true);
1208-
copyMessagesStateFromChannel(channel);
1208+
copyMsgsStateFromChannel(channel);
12091209

12101210
if (thread && newMessage.parent_id) {
12111211
const threadMessages = channel.state.threads[newMessage.parent_id] || [];
@@ -1505,7 +1505,7 @@ const ChannelWithContext = <
15051505
) => {
15061506
if (channel) {
15071507
channel.state.removeMessage(message);
1508-
copyMessagesStateFromChannel(channel);
1508+
copyMsgsStateFromChannel(channel);
15091509

15101510
if (thread) {
15111511
setThreadMessages(channel.state.threads[thread.id] || []);
@@ -1545,7 +1545,7 @@ const ChannelWithContext = <
15451545
user: client.user,
15461546
});
15471547

1548-
copyMessagesStateFromChannel(channel);
1548+
copyMsgsStateFromChannel(channel);
15491549

15501550
const sendReactionResponse = await DBSyncManager.queueTask<StreamChatGenerics>({
15511551
client,
@@ -1631,7 +1631,7 @@ const ChannelWithContext = <
16311631
user: client.user,
16321632
});
16331633

1634-
copyMessagesStateFromChannel(channel);
1634+
copyMsgsStateFromChannel(channel);
16351635

16361636
await DBSyncManager.queueTask<StreamChatGenerics>({
16371637
client,

0 commit comments

Comments
 (0)