chore: minor tweaks
This commit is contained in:
parent
244c2a05a9
commit
ba2b9e862b
|
@ -26,4 +26,5 @@ export interface IRoom extends IRocketChatRecord {
|
|||
observe?: Function;
|
||||
usedCannedResponse?: string;
|
||||
bannerClosed?: boolean;
|
||||
lastOpen?: Date;
|
||||
}
|
||||
|
|
|
@ -138,17 +138,21 @@ interface IRoomViewProps {
|
|||
|
||||
interface IRoomItem {
|
||||
id?: string;
|
||||
tmid?: string;
|
||||
tmsg?: string;
|
||||
t?: any;
|
||||
e2e?: string;
|
||||
tlm?: string;
|
||||
rid?: string;
|
||||
ts?: Date;
|
||||
status?: any;
|
||||
u?: { _id: string };
|
||||
}
|
||||
|
||||
interface INavToThread {
|
||||
id?: string;
|
||||
tmsg?: string;
|
||||
t?: any;
|
||||
e2e?: string;
|
||||
tmid?: string;
|
||||
tlm?: string;
|
||||
}
|
||||
|
||||
class RoomView extends React.Component<IRoomViewProps, any> {
|
||||
private rid: string;
|
||||
private t: RoomType;
|
||||
|
@ -927,7 +931,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
|||
}
|
||||
};
|
||||
|
||||
navToThread = async (item: IRoomItem) => {
|
||||
navToThread = async (item: INavToThread) => {
|
||||
const { roomUserId } = this.state;
|
||||
const { navigation } = this.props;
|
||||
|
||||
|
@ -965,7 +969,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
|||
}
|
||||
};
|
||||
|
||||
navToRoom = async (message: IRoomItem) => {
|
||||
navToRoom = async (message: { rid: string; id: string }) => {
|
||||
const { navigation, isMasterDetail } = this.props;
|
||||
const roomInfo: any = await getRoomInfo(message.rid);
|
||||
return goRoom({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import RocketChat from '../../../lib/rocketchat';
|
||||
import { IRoom } from '../../../definitions/IRoom';
|
||||
|
||||
// TODO - after merge navigation ts, change the room and the promisse return
|
||||
const getMessages = (room: any): Promise<any> => {
|
||||
const getMessages = (room: IRoom): Promise<void> => {
|
||||
if (room.lastOpen) {
|
||||
return RocketChat.loadMissedMessages(room);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue