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;
fname?: string;
prid?: string;
room: IRoom;
room?: IRoom;
jumpToMessageId?: string;
jumpToThreadId?: string;
roomUserId?: string;

View File

@ -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<IRoomListContainerProps, any> {

View File

@ -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;

View File

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

View File

@ -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<IRoomViewProps, any> {
rid: item.drid,
prid: item.rid,
name: item.msg,
t: 'p'
t: RoomType.GROUP
});
},
1000,
@ -907,7 +907,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
}
};
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<IRoomViewProps, any> {
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<IRoomViewProps, any> {
rid: this.rid,
tmid: item.id,
name: makeThreadName(item),
t: 'thread',
t: RoomType.THREAD,
roomUserId
});
}