chore: minor tweaks

This commit is contained in:
AlexAlexandre 2021-12-07 01:18:58 -03:00
parent f68ed794d2
commit 244c2a05a9
5 changed files with 9 additions and 8 deletions

View File

@ -21,7 +21,7 @@ export type ChatsStackParamList = {
name?: string; name?: string;
fname?: string; fname?: string;
prid?: string; prid?: string;
room: IRoom; room?: IRoom;
jumpToMessageId?: string; jumpToMessageId?: string;
jumpToThreadId?: string; jumpToThreadId?: string;
roomUserId?: string; roomUserId?: string;

View File

@ -46,6 +46,7 @@ interface IRoomListContainerProps {
navigation: any; // TODO - change this after merge with navigation ts; navigation: any; // TODO - change this after merge with navigation ts;
showMessageInMainThread: boolean; showMessageInMainThread: boolean;
serverVersion: string; serverVersion: string;
t?: string; // TODO - verify if this props exist
} }
class ListContainer extends React.Component<IRoomListContainerProps, any> { class ListContainer extends React.Component<IRoomListContainerProps, any> {

View File

@ -81,4 +81,4 @@ const mapStateToProps = (state: any) => ({
isMasterDetail: state.app.isMasterDetail isMasterDetail: state.app.isMasterDetail
}); });
export default connect(mapStateToProps)(withTheme(ReactionPicker)); export default connect(mapStateToProps)(withTheme(ReactionPicker)) as any;

View File

@ -34,7 +34,7 @@ const styles = StyleSheet.create({
}); });
interface IRoomDateSeparatorProps { interface IRoomDateSeparatorProps {
ts: Date | null; ts?: Date | null;
unread: boolean; unread: boolean;
theme: string; theme: string;
} }

View File

@ -140,7 +140,7 @@ interface IRoomItem {
id?: string; id?: string;
tmid?: string; tmid?: string;
tmsg?: string; tmsg?: string;
t?: RoomType; t?: any;
e2e?: string; e2e?: string;
tlm?: string; tlm?: string;
rid?: string; rid?: string;
@ -732,7 +732,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
rid: item.drid, rid: item.drid,
prid: item.rid, prid: item.rid,
name: item.msg, name: item.msg,
t: 'p' t: RoomType.GROUP
}); });
}, },
1000, 1000,
@ -907,7 +907,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
} }
}; };
getBadgeColor = (messageId: string) => { getBadgeColor = (messageId?: string) => {
const { room } = this.state; const { room } = this.state;
const { theme } = this.props; const { theme } = this.props;
return getBadgeColor({ subscription: room, theme, messageId }); return getBadgeColor({ subscription: room, theme, messageId });
@ -948,7 +948,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
rid: this.rid, rid: this.rid,
tmid: item.tmid, tmid: item.tmid,
name, name,
t: 'thread', t: RoomType.THREAD,
roomUserId, roomUserId,
jumpToMessageId: item.id jumpToMessageId: item.id
}); });
@ -959,7 +959,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
rid: this.rid, rid: this.rid,
tmid: item.id, tmid: item.id,
name: makeThreadName(item), name: makeThreadName(item),
t: 'thread', t: RoomType.THREAD,
roomUserId roomUserId
}); });
} }