diff --git a/app/stacks/types.ts b/app/stacks/types.ts index 652f8b10b..89a67181f 100644 --- a/app/stacks/types.ts +++ b/app/stacks/types.ts @@ -21,7 +21,7 @@ export type ChatsStackParamList = { name?: string; fname?: string; prid?: string; - room: IRoom; + room?: IRoom; jumpToMessageId?: string; jumpToThreadId?: string; roomUserId?: string; diff --git a/app/views/RoomView/List/index.tsx b/app/views/RoomView/List/index.tsx index 2a2c455dd..0dc2c9759 100644 --- a/app/views/RoomView/List/index.tsx +++ b/app/views/RoomView/List/index.tsx @@ -46,6 +46,7 @@ interface IRoomListContainerProps { navigation: any; // TODO - change this after merge with navigation ts; showMessageInMainThread: boolean; serverVersion: string; + t?: string; // TODO - verify if this props exist } class ListContainer extends React.Component { diff --git a/app/views/RoomView/ReactionPicker.tsx b/app/views/RoomView/ReactionPicker.tsx index 65a5bde75..55660a010 100644 --- a/app/views/RoomView/ReactionPicker.tsx +++ b/app/views/RoomView/ReactionPicker.tsx @@ -81,4 +81,4 @@ const mapStateToProps = (state: any) => ({ isMasterDetail: state.app.isMasterDetail }); -export default connect(mapStateToProps)(withTheme(ReactionPicker)); +export default connect(mapStateToProps)(withTheme(ReactionPicker)) as any; diff --git a/app/views/RoomView/Separator.tsx b/app/views/RoomView/Separator.tsx index 21289e762..2b683b33f 100644 --- a/app/views/RoomView/Separator.tsx +++ b/app/views/RoomView/Separator.tsx @@ -34,7 +34,7 @@ const styles = StyleSheet.create({ }); interface IRoomDateSeparatorProps { - ts: Date | null; + ts?: Date | null; unread: boolean; theme: string; } diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index c01e79500..2f005d301 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -140,7 +140,7 @@ interface IRoomItem { id?: string; tmid?: string; tmsg?: string; - t?: RoomType; + t?: any; e2e?: string; tlm?: string; rid?: string; @@ -732,7 +732,7 @@ class RoomView extends React.Component { rid: item.drid, prid: item.rid, name: item.msg, - t: 'p' + t: RoomType.GROUP }); }, 1000, @@ -907,7 +907,7 @@ class RoomView extends React.Component { } }; - getBadgeColor = (messageId: string) => { + getBadgeColor = (messageId?: string) => { const { room } = this.state; const { theme } = this.props; return getBadgeColor({ subscription: room, theme, messageId }); @@ -948,7 +948,7 @@ class RoomView extends React.Component { rid: this.rid, tmid: item.tmid, name, - t: 'thread', + t: RoomType.THREAD, roomUserId, jumpToMessageId: item.id }); @@ -959,7 +959,7 @@ class RoomView extends React.Component { rid: this.rid, tmid: item.id, name: makeThreadName(item), - t: 'thread', + t: RoomType.THREAD, roomUserId }); }