update: MessageBox

This commit is contained in:
Gerzon Z 2022-05-04 14:19:36 -04:00
parent 629f17d967
commit e5a284e9db
2 changed files with 7 additions and 1 deletions

View File

@ -112,6 +112,7 @@ export interface IMessageBoxProps extends IBaseScreen<ChatsStackParamList & Mast
serverVersion: string;
viewCannedResponsesPermission: boolean;
goToCannedResponses: () => void;
joined: boolean;
}
interface IMessageBoxState {
@ -317,7 +318,8 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
permissionToUpload
} = 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) {
return true;
}
@ -327,6 +329,9 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
if (nextProps.roomType !== roomType) {
return true;
}
if (nextProps.joined !== joined) {
return true;
}
if (nextProps.replying !== replying) {
return true;
}

View File

@ -1419,6 +1419,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
onSubmit={this.handleSendMessage}
rid={this.rid}
tmid={this.tmid}
joined={joined}
roomType={room.t}
isFocused={navigation.isFocused}
theme={theme}