[FIX] Allows more than 25 discussions/files to be loaded in the contextualbar (#21511)

pull/21490/head
Jean 4 years ago committed by GitHub
parent 4df74b92fb
commit 2e22fcfd20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      client/contexts/ServerContext/endpoints/v1/channels/files.ts
  2. 2
      client/views/room/contextualBar/Discussions/useDiscussionsList.ts
  3. 3
      client/views/room/contextualBar/RoomFiles/hooks/useFilesList.ts

@ -5,6 +5,7 @@ import { ObjectFromApi } from '../../../../../../definition/ObjectFromApi';
export type FilesEndpoint = {
GET: (params: {
roomId: IRoom['_id'];
offset: number;
count: number;
sort: string;
query: string;

@ -31,7 +31,7 @@ export const useDiscussionsList = (
roomId: options.rid,
text: options.text,
offset: start,
count: end - start,
count: end,
});
return {

@ -40,7 +40,8 @@ export const useFilesList = (
async (start, end) => {
const { files, total } = await getFiles({
roomId: options.rid,
count: end - start,
offset: start,
count: end,
sort: JSON.stringify({ uploadedAt: -1 }),
query: JSON.stringify({
name: { $regex: options.text || '', $options: 'i' },

Loading…
Cancel
Save