Skip to content
Merged

v9.5.1 #1739

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"peerDependencies": {
"react": "^18.0.0 || ^17.0.0 || ^16.8.0",
"react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
"stream-chat": "^6.9.0"
"stream-chat": "^7.1.0"
},
"files": [
"dist",
Expand Down Expand Up @@ -167,7 +167,7 @@
"rollup-plugin-visualizer": "^4.2.0",
"semantic-release": "^19.0.2",
"semantic-release-cli": "^5.4.4",
"stream-chat": "^6.9.0",
"stream-chat": "^7.1.0",
"style-loader": "^2.0.0",
"ts-jest": "^26.5.1",
"tslib": "2.3.0",
Expand Down
9 changes: 8 additions & 1 deletion src/components/Channel/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ const ChannelInner = <
return queryResponse.messages.length;
};

const clearHighlightedMessageTimeoutId = useRef<ReturnType<typeof setTimeout> | null>(null);

const jumpToMessage = async (messageId: string, messageLimit = 100) => {
dispatch({ loadingMore: true, type: 'setLoadingMore' });
await channel.state.loadMessageIntoState(messageId, undefined, messageLimit);
Expand All @@ -542,7 +544,12 @@ const ChannelInner = <
type: 'jumpToMessageFinished',
});

setTimeout(() => {
if (clearHighlightedMessageTimeoutId.current) {
clearTimeout(clearHighlightedMessageTimeoutId.current);
}

clearHighlightedMessageTimeoutId.current = setTimeout(() => {
clearHighlightedMessageTimeoutId.current = null;
dispatch({ type: 'clearHighlightedMessage' });
}, 500);
};
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16050,10 +16050,10 @@ stream-browserify@^2.0.1:
inherits "~2.0.1"
readable-stream "^2.0.2"

stream-chat@^6.9.0:
version "6.9.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-6.9.0.tgz#cc5c8e68849b36a891178b6b39cd150fc8a69ddf"
integrity sha512-GERt6ohbMucs1mOFY6xoU3p9gl0oEQieod09hSiaRnHG++LP//SQafYlSyE9v2n368VQcc6OSiP5tAinBWafJw==
stream-chat@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-7.1.0.tgz#b5dc7f999d32aa257bb2458d5c57116acb4a656f"
integrity sha512-MY3dXFbF5xIGKjXE6qHAjzLQkjMeZARCWl22EP7qkVDH0fCzuhRO2MR5L3MaatX3rrUj7MkkLc0Mw0rqjY7PPw==
dependencies:
"@babel/runtime" "^7.16.3"
"@types/jsonwebtoken" "^8.5.6"
Expand Down