Skip to content

Commit

Permalink
Merge pull request #391 from matrix-org/dbkr/fix_historical_freeze
Browse files Browse the repository at this point in the history
Fix long freeze when opening 'historical' section
  • Loading branch information
richvdh committed Aug 5, 2016
2 parents e8dbf97 + 9d958ab commit ff02c21
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/views/rooms/InviteMemberList.js
Expand Up @@ -13,10 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
var React = require('react');
var sdk = require("../../../index");
var Entities = require("../../../Entities");
var MatrixClientPeg = require("../../../MatrixClientPeg");
import React from 'react';
import sdk from '../../../index';
import Entities from '../../../Entities';
import MatrixClientPeg from '../../../MatrixClientPeg';
import rate_limited_func from '../../../ratelimitedfunc';

const INITIAL_SEARCH_RESULTS_COUNT = 10;

Expand Down Expand Up @@ -59,7 +60,7 @@ module.exports = React.createClass({
}
},

_updateList: function() {
_updateList: new rate_limited_func(function() {
this._room = MatrixClientPeg.get().getRoom(this.props.roomId);
// Load the complete user list for inviting new users
if (this._room) {
Expand All @@ -68,7 +69,7 @@ module.exports = React.createClass({
!this._room.hasMembershipState(u.userId, "invite"));
});
}
},
}, 500),

onRoomStateMember: function(ev, state, member) {
this._updateList();
Expand Down

0 comments on commit ff02c21

Please sign in to comment.