From 60583eb5170e8442d5f998ac119e46dbe008824a Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Wed, 15 Dec 2021 01:07:38 -0300 Subject: [PATCH] minor tweak --- app/views/RoomView/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 8d73ef484..6788dca19 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -1004,12 +1004,12 @@ class RoomView extends React.Component { } }; - handleCommands = ({ event }: any) => { + handleCommands = ({ event }: { event: { input: string } }) => { if (this.rid) { const { input } = event; if (handleCommandScroll(event)) { - const offset: any = input === 'UIKeyInputUpArrow' ? 100 : -100; - this.offset += offset; + const offset: number = input === 'UIKeyInputUpArrow' ? 100 : -100; + this.offset = this.offset ? (this.offset += offset) : this.offset; this.flatList?.scrollToOffset({ offset: this.offset }); } else if (handleCommandRoomActions(event)) { this.goRoomActionsView();