update: MessageBox
This commit is contained in:
parent
629f17d967
commit
e5a284e9db
|
@ -112,6 +112,7 @@ export interface IMessageBoxProps extends IBaseScreen<ChatsStackParamList & Mast
|
||||||
serverVersion: string;
|
serverVersion: string;
|
||||||
viewCannedResponsesPermission: boolean;
|
viewCannedResponsesPermission: boolean;
|
||||||
goToCannedResponses: () => void;
|
goToCannedResponses: () => void;
|
||||||
|
joined: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IMessageBoxState {
|
interface IMessageBoxState {
|
||||||
|
@ -317,7 +318,8 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
|
||||||
permissionToUpload
|
permissionToUpload
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission } = this.props;
|
const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission, joined } =
|
||||||
|
this.props;
|
||||||
if (nextProps.theme !== theme) {
|
if (nextProps.theme !== theme) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -327,6 +329,9 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
|
||||||
if (nextProps.roomType !== roomType) {
|
if (nextProps.roomType !== roomType) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (nextProps.joined !== joined) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (nextProps.replying !== replying) {
|
if (nextProps.replying !== replying) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1419,6 +1419,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
onSubmit={this.handleSendMessage}
|
onSubmit={this.handleSendMessage}
|
||||||
rid={this.rid}
|
rid={this.rid}
|
||||||
tmid={this.tmid}
|
tmid={this.tmid}
|
||||||
|
joined={joined}
|
||||||
roomType={room.t}
|
roomType={room.t}
|
||||||
isFocused={navigation.isFocused}
|
isFocused={navigation.isFocused}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
Loading…
Reference in New Issue