chore: minor tweaks
This commit is contained in:
parent
8a4892e61e
commit
d675828c28
|
@ -132,22 +132,22 @@ interface IRoomViewProps {
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
insets: {
|
insets: {
|
||||||
left: boolean;
|
left: number;
|
||||||
right: boolean;
|
right: number;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IRoomItem {
|
interface IRoomItem {
|
||||||
id: string;
|
id?: string;
|
||||||
tmid: string;
|
tmid?: string;
|
||||||
tmsg: string;
|
tmsg?: string;
|
||||||
t: RoomType;
|
t?: RoomType;
|
||||||
e2e: string;
|
e2e?: string;
|
||||||
tlm: string;
|
tlm?: string;
|
||||||
rid: string;
|
rid?: string;
|
||||||
ts: Date;
|
ts?: Date;
|
||||||
status: any;
|
status?: any;
|
||||||
u: { _id: string };
|
u?: { _id: string };
|
||||||
}
|
}
|
||||||
|
|
||||||
class RoomView extends React.Component<IRoomViewProps, any> {
|
class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
|
@ -189,7 +189,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
const name = props.route.params?.name;
|
const name = props.route.params?.name;
|
||||||
const fname = props.route.params?.fname;
|
const fname = props.route.params?.fname;
|
||||||
const prid = props.route.params?.prid;
|
const prid = props.route.params?.prid;
|
||||||
const room = props.route.params?.room ?? {
|
const room: any = props.route.params?.room ?? {
|
||||||
rid: this.rid,
|
rid: this.rid,
|
||||||
t: this.t,
|
t: this.t,
|
||||||
name,
|
name,
|
||||||
|
@ -727,7 +727,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
};
|
};
|
||||||
|
|
||||||
onDiscussionPress = debounce(
|
onDiscussionPress = debounce(
|
||||||
item => {
|
(item: any) => {
|
||||||
const { navigation } = this.props;
|
const { navigation } = this.props;
|
||||||
navigation.push('RoomView', {
|
navigation.push('RoomView', {
|
||||||
rid: item.drid,
|
rid: item.drid,
|
||||||
|
@ -785,10 +785,10 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
jumpToMessage = async (messageId: string) => {
|
jumpToMessage = async (messageId?: string) => {
|
||||||
try {
|
try {
|
||||||
this.setState({ showingBlockingLoader: true });
|
this.setState({ showingBlockingLoader: true });
|
||||||
const message = await RoomServices.getMessageInfo(messageId);
|
const message = await RoomServices.getMessageInfo(messageId!);
|
||||||
|
|
||||||
if (!message) {
|
if (!message) {
|
||||||
return;
|
return;
|
||||||
|
@ -895,7 +895,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
getThreadName = (tmid: string, messageId: string) => getThreadName(this.rid, tmid, messageId);
|
getThreadName = (tmid: string, messageId?: string) => getThreadName(this.rid, tmid, messageId);
|
||||||
|
|
||||||
toggleFollowThread = async (isFollowingThread: boolean, tmid: string) => {
|
toggleFollowThread = async (isFollowingThread: boolean, tmid: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue