Skip to content
Snippets Groups Projects
Unverified Commit 862bd08c authored by Filipe Marins's avatar Filipe Marins Committed by GitHub
Browse files

[FIX] Avatars of other chats disappear when they located near chat with broken avatar (#26689)

parent 10932a53
No related branches found
No related tags found
No related merge requests found
import { IRoom } from '@rocket.chat/core-typings';
import { Box } from '@rocket.chat/fuselage';
import { useResizeObserver } from '@rocket.chat/fuselage-hooks';
import { useSession, useUserPreference, useUserId, useTranslation } from '@rocket.chat/ui-contexts';
......@@ -13,6 +14,8 @@ import { useTemplateByViewMode } from '../hooks/useTemplateByViewMode';
import Row from './Row';
import ScrollerWithCustomProps from './ScrollerWithCustomProps';
const computeItemKey = (index: number, room: IRoom): IRoom['_id'] | number => room._id || index;
const RoomList = (): ReactElement => {
useSidebarPaletteColor();
......@@ -50,6 +53,7 @@ const RoomList = (): ReactElement => {
totalCount={roomsList.length}
data={roomsList}
components={{ Scroller: ScrollerWithCustomProps }}
computeItemKey={computeItemKey}
itemContent={(_, data): ReactElement => <Row data={itemData} item={data} />}
/>
</Box>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment