From d675828c28ea73f556c1d0e33b23bccfefbc329c Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Mon, 6 Dec 2021 21:58:57 -0300 Subject: [PATCH] chore: minor tweaks --- app/views/RoomView/index.tsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 9600ebdb6..4dac30aef 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -132,22 +132,22 @@ interface IRoomViewProps { width: number; height: number; insets: { - left: boolean; - right: boolean; + left: number; + right: number; }; } interface IRoomItem { - id: string; - tmid: string; - tmsg: string; - t: RoomType; - e2e: string; - tlm: string; - rid: string; - ts: Date; - status: any; - u: { _id: string }; + id?: string; + tmid?: string; + tmsg?: string; + t?: RoomType; + e2e?: string; + tlm?: string; + rid?: string; + ts?: Date; + status?: any; + u?: { _id: string }; } class RoomView extends React.Component { @@ -189,7 +189,7 @@ class RoomView extends React.Component { const name = props.route.params?.name; const fname = props.route.params?.fname; const prid = props.route.params?.prid; - const room = props.route.params?.room ?? { + const room: any = props.route.params?.room ?? { rid: this.rid, t: this.t, name, @@ -727,7 +727,7 @@ class RoomView extends React.Component { }; onDiscussionPress = debounce( - item => { + (item: any) => { const { navigation } = this.props; navigation.push('RoomView', { rid: item.drid, @@ -785,10 +785,10 @@ class RoomView extends React.Component { } }; - jumpToMessage = async (messageId: string) => { + jumpToMessage = async (messageId?: string) => { try { this.setState({ showingBlockingLoader: true }); - const message = await RoomServices.getMessageInfo(messageId); + const message = await RoomServices.getMessageInfo(messageId!); if (!message) { return; @@ -895,7 +895,7 @@ class RoomView extends React.Component { } }; - getThreadName = (tmid: string, messageId: string) => getThreadName(this.rid, tmid, messageId); + getThreadName = (tmid: string, messageId?: string) => getThreadName(this.rid, tmid, messageId); toggleFollowThread = async (isFollowingThread: boolean, tmid: string) => { try {