Only display the MessageComposer if you're joined and not viewing search results
This commit is contained in:
parent
f0ff62166b
commit
d1baf5854c
1 changed files with 10 additions and 3 deletions
|
@ -1279,16 +1279,23 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
var messageComposer, searchInfo;
|
var messageComposer, searchInfo;
|
||||||
if (!this.state.searchResults) {
|
var canSpeak = (
|
||||||
|
// joined and not showing search results
|
||||||
|
myMember && (myMember.membership == 'join') && !this.state.searchResults
|
||||||
|
);
|
||||||
|
if (canSpeak) {
|
||||||
messageComposer =
|
messageComposer =
|
||||||
<MessageComposer room={this.state.room} roomView={this} uploadFile={this.uploadFile} callState={this.state.callState} />
|
<MessageComposer room={this.state.room} roomView={this} uploadFile={this.uploadFile} callState={this.state.callState} />
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
// TODO: Why aren't we storing the term/scope/count in this format
|
||||||
|
// in this.state if this is what RoomHeader desires?
|
||||||
|
if (this.state.searchResults) {
|
||||||
searchInfo = {
|
searchInfo = {
|
||||||
searchTerm : this.state.searchTerm,
|
searchTerm : this.state.searchTerm,
|
||||||
searchScope : this.state.searchScope,
|
searchScope : this.state.searchScope,
|
||||||
searchCount : this.state.searchCount,
|
searchCount : this.state.searchCount,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var call = CallHandler.getCallForRoom(this.props.roomId);
|
var call = CallHandler.getCallForRoom(this.props.roomId);
|
||||||
|
|
Loading…
Reference in a new issue