Skip to content
Merged
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
8 changes: 4 additions & 4 deletions examples/SampleApp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8349,10 +8349,10 @@ stream-chat-react-native-core@8.1.0:
version "0.0.0"
uid ""

stream-chat@^9.27.2:
version "9.27.2"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.27.2.tgz#5b41173e513f3606c47c93f391693b589e663968"
integrity sha512-OdALDzg8lO8CAdl8deydJ1+O4wJ7mM9dPLeCwDppq/OQ4aFIS9X38P+IdXPcOCsgSS97UoVUuxD2/excC5PEeg==
stream-chat@^9.33.0:
version "9.35.1"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.35.1.tgz#d828854a9c27ea7e45e6642d9107966c6606f552"
integrity sha512-649sgO7+llFuW+y/Ja0K4d94aUC+EMxYUVo5mq5AFGT86vUAIXmRIMVHYHA/jw4MYoqfWAFrDK6L9Rhyn/eMkQ==
dependencies:
"@types/jsonwebtoken" "^9.0.8"
"@types/ws" "^8.5.14"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ describe('useMessageListPagination', () => {

await waitFor(() => {
expect(queryFn).toHaveBeenCalledWith({
messages: { id_lt: messages[0].id },
watchers: {},
messages: { id_lt: messages[0].id, limit: 25 },
watchers: { limit: 25 },
});
expect(result.current.state.hasMore).toBe(true);
expect(result.current.state.messages.length).toBe(40);
Expand Down Expand Up @@ -252,8 +252,8 @@ describe('useMessageListPagination', () => {

await waitFor(() => {
expect(queryFn).toHaveBeenCalledWith({
messages: { id_gt: messages[messages.length - 1].id },
watchers: {},
messages: { id_gt: messages[messages.length - 1].id, limit: 10 },
watchers: { limit: 10 },
});
expect(result.current.state.hasMore).toBe(true);
expect(result.current.state.messages.length).toBe(40);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const useMessageListPagination = ({ channel }: { channel: Channel }) => {
/**
* This function loads more messages before the first message in current channel state.
*/
const loadMore = useStableCallback(async (limit?: number) => {
const loadMore = useStableCallback(async (limit: number = 25) => {
if (!channel.state.messagePagination.hasPrev) {
return;
}
Expand Down Expand Up @@ -103,7 +103,7 @@ export const useMessageListPagination = ({ channel }: { channel: Channel }) => {
/**
* This function loads more messages after the most recent message in current channel state.
*/
const loadMoreRecent = useStableCallback(async (limit?: number) => {
const loadMoreRecent = useStableCallback(async (limit: number = 10) => {
if (!channel.state.messagePagination.hasNext) {
return;
}
Expand Down
Loading