diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-09 16:46:30 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-09 16:46:30 +0200 |
commit | 1ef51e79393b98ecf874dce298892f32570dcdd4 (patch) | |
tree | a5f80d6980c50595ebbe3bc6398b9900819765d5 /webclient/room/room-controller.js | |
parent | When the user has been kicked or banned from a room, remove the room from his... (diff) | |
download | synapse-1ef51e79393b98ecf874dce298892f32570dcdd4.tar.xz |
Improved room page loading flow: do pagination only when the members list is available.
Killed an unexpected pagination trigger when the page load: paginateMore
Diffstat (limited to '')
-rw-r--r-- | webclient/room/room-controller.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index f81c3df7d2..59f64061cd 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -30,7 +30,7 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) events_from: "END", // when to start the event stream from. earliest_token: "END", // stores how far back we've paginated. first_pagination: true, // this is toggled off when the first pagination is done - can_paginate: true, // this is toggled off when we run out of items + can_paginate: false, // this is toggled off when we are not ready yet to paginate or when we run out of items paginating: false, // used to avoid concurrent pagination requests pulling in dup contents stream_failure: undefined, // the response when the stream fails waiting_for_joined_event: false // true when the join request is pending. Back to false once the corresponding m.room.member event is received @@ -679,13 +679,15 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) // Arm list timing update timer updateMemberListPresenceAge(); + + // Start pagination + $scope.state.can_paginate = true; + paginate(MESSAGES_PER_PAGINATION); }, function(error) { $scope.feedback = "Failed get member list: " + error.data.error; } ); - - paginate(MESSAGES_PER_PAGINATION); }; $scope.inviteUser = function(user_id) { |