minor tweak

This commit is contained in:
AlexAlexandre 2021-12-15 01:07:38 -03:00
parent 18b2f3388d
commit 60583eb517
1 changed files with 3 additions and 3 deletions

View File

@ -1004,12 +1004,12 @@ class RoomView extends React.Component<IRoomViewProps, any> {
}
};
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();