From 6a9194846945303a88025fc1cdad5c6fff45f761 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Wed, 14 Sep 2016 18:01:07 +0100 Subject: [PATCH] Removed the Email (Invite by email) section --- .../views/rooms/InviteMemberList.js | 28 +++++++++---------- .../views/rooms/SearchableEntityList.js | 18 ++---------- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/components/views/rooms/InviteMemberList.js b/src/components/views/rooms/InviteMemberList.js index 1e5b19fdf1..ee5eabbeab 100644 --- a/src/components/views/rooms/InviteMemberList.js +++ b/src/components/views/rooms/InviteMemberList.js @@ -90,7 +90,7 @@ module.exports = React.createClass({ var EntityTile = sdk.getComponent("rooms.EntityTile"); var BaseAvatar = sdk.getComponent("avatars.BaseAvatar"); - var label = input; + // var label = input; // if (input[0] === "@") { // label = input; // } @@ -98,16 +98,16 @@ module.exports = React.createClass({ // label = "Email: " + input; // } - this._emailEntity = new Entities.newEntity( - } - className="mx_EntityTile_invitePlaceholder" - presenceState="online" onClick={this.onThirdPartyInvite} name={"Invite by email"} - />, - function(query) { - return true; // always show this - } - ); + // this._emailEntity = new Entities.newEntity( + // } + // className="mx_EntityTile_invitePlaceholder" + // presenceState="online" onClick={this.onThirdPartyInvite} name={"Invite by email"} + // />, + // function(query) { + // return true; // always show this + // } + // ); this.props.onSearchQueryChanged(input); }, @@ -117,9 +117,9 @@ module.exports = React.createClass({ var entities = Entities.fromUsers(this._userList || [], true, this.props.onInvite); // Add an "Email: foo@bar.com" tile as the first tile - if (this._emailEntity) { - entities.unshift(this._emailEntity); - } + // if (this._emailEntity) { + // entities.unshift(this._emailEntity); + // } return ( { - if (this._blurTimeout) { - clearTimeout(this.blurTimeout); - } - this.setState({ focused: true }); - } } - onBlur={ ()=>{ - // nasty setTimeout heuristic to avoid the 'invite by email' prompt disappearing - // due to the onBlur before we can click on it - this._blurTimeout = setTimeout( - ()=>{ this.setState({ focused: false }) }, - 300 - ); - } } + onFocus= {() => { this.setState({ focused: true }) }} + onBlur= {() => { this.setState({ focused: false }) }} placeholder={this.props.searchPlaceholderText} /> );