From 25da0f6a7acfa96a933280e0fa68558a5a5f8057 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 22 Sep 2017 17:01:14 +0100 Subject: [PATCH] MemberList: show 100 more on overflow tile click Not the full list because on HQ that causes your browser to implode. This should really be a decent paginated list at this point, but this is better for now. --- src/components/views/rooms/MemberList.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index babbfcf649..f916c55020 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -31,6 +31,7 @@ var CallHandler = require("../../../CallHandler"); const INITIAL_LOAD_NUM_MEMBERS = 30; const INITIAL_LOAD_NUM_INVITED = 5; +const SHOW_MORE_INCREMENT = 100; module.exports = React.createClass({ displayName: 'MemberList', @@ -207,11 +208,11 @@ module.exports = React.createClass({ }, _createOverflowTileJoined: function(overflowCount, totalCount) { - return this._createOverflowTile(overflowCount, totalCount, this._showFullJoinedMemberList); + return this._createOverflowTile(overflowCount, totalCount, this._showMoreJoinedMemberList); }, _createOverflowTileInvited: function(overflowCount, totalCount) { - return this._createOverflowTile(overflowCount, totalCount, this._showFullInvitedMemberList); + return this._createOverflowTile(overflowCount, totalCount, this._showMoreInvitedMemberList); }, _createOverflowTile: function(overflowCount, totalCount, onClick) { @@ -227,15 +228,15 @@ module.exports = React.createClass({ ); }, - _showFullJoinedMemberList: function() { + _showMoreJoinedMemberList: function() { this.setState({ - truncateAtJoined: -1 + truncateAtJoined: this.state.truncateAtJoined + SHOW_MORE_INCREMENT, }); }, - _showFullInvitedMemberList: function() { + _showMoreInvitedMemberList: function() { this.setState({ - truncateAtInvited: -1 + truncateAtInvited: this.state.truncateAtInvited + SHOW_MORE_INCREMENT, }); },