Hide 'Email: ' is the first char is @
This commit is contained in:
parent
c3f786cc5e
commit
e78c1fba87
1 changed files with 11 additions and 4 deletions
|
@ -312,11 +312,18 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
onSearchQueryChanged: function(input) {
|
onSearchQueryChanged: function(input) {
|
||||||
var EntityTile = sdk.getComponent("rooms.EntityTile");
|
var EntityTile = sdk.getComponent("rooms.EntityTile");
|
||||||
|
|
||||||
|
var label;
|
||||||
|
if (input[0] === "@") {
|
||||||
|
label = input;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
label = "Email: " + input;
|
||||||
|
}
|
||||||
|
|
||||||
this._emailEntity = new Entities.newEntity(
|
this._emailEntity = new Entities.newEntity(
|
||||||
<EntityTile key="inv_email" suppressOnHover={true} showInviteButton={true}
|
<EntityTile key="dynamic_invite_tile" suppressOnHover={true} showInviteButton={true}
|
||||||
presenceState="online" onClick={this.onInvite.bind(this, input)} name={
|
presenceState="online" onClick={this.onInvite.bind(this, input)} name={label} />,
|
||||||
`Email: ${input}`
|
|
||||||
} />,
|
|
||||||
function(query) {
|
function(query) {
|
||||||
return true; // always show this
|
return true; // always show this
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue