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