From e738f5c80f247ebd06a2e7883a0c7a60c6ff0759 Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Tue, 7 Dec 2021 22:33:06 -0300 Subject: [PATCH] chore: minor tweak --- app/views/RoomView/List/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/RoomView/List/index.tsx b/app/views/RoomView/List/index.tsx index d23546294..0f2299b15 100644 --- a/app/views/RoomView/List/index.tsx +++ b/app/views/RoomView/List/index.tsx @@ -20,6 +20,7 @@ import { compareServerVersion, methods } from '../../../lib/utils'; import List from './List'; import NavBottomFAB from './NavBottomFAB'; import { ChatsStackParamList } from '../../../stacks/types'; +import { IRoomItem } from '../index'; const QUERY_SIZE = 50; @@ -270,7 +271,7 @@ class ListContainer extends React.Component { return null; }; - handleScrollToIndexFailed = (params: any) => { + handleScrollToIndexFailed = (params: { highestMeasuredFrameIndex: number }) => { const { listRef } = this.props; listRef.current.getNode().scrollToIndex({ index: params.highestMeasuredFrameIndex, animated: false }); }; @@ -324,7 +325,7 @@ class ListContainer extends React.Component { return null; }; - renderItem = ({ item, index }: { item: any; index: number }) => { + renderItem = ({ item, index }: { item: IRoomItem; index: number }) => { const { messages, highlightedMessage } = this.state; const { renderRow } = this.props; return renderRow(item, messages[index + 1], highlightedMessage);