summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-09-18 18:17:27 +0100
committerMatthew Hodgson <matthew@matrix.org>2014-09-18 18:18:30 +0100
commit2ab7e23790e416f16ea3ba939dd6a91bb8cfa936 (patch)
tree9d3e3d437815f13326844a6a8e2f38e8c071ed57 /webclient/room/room-controller.js
parentFixed missing component dependency which created a crash (diff)
downloadsynapse-2ab7e23790e416f16ea3ba939dd6a91bb8cfa936.tar.xz
fix SYWEB-41 (hopefully)
Diffstat (limited to '')
-rw-r--r--webclient/room/room-controller.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index cfdc6d0157..ac8f767d16 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -703,7 +703,13 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
                 if ($rootScope.events.rooms[$scope.room_id]) {
 
                     // There is no need to do a 1st pagination (initialSync provided enough to fill a page)
-                    $scope.state.first_pagination = false;
+                    if ($rootScope.events.rooms[$scope.room_id].messages.length) {
+                        $scope.state.first_pagination = false;
+                    }
+                    else {
+                        // except if we just joined a room, we won't have this history from initial sync, so we should try to paginate it anyway                        
+                        $scope.state.first_pagination = true;
+                    }
 
                     var members = $rootScope.events.rooms[$scope.room_id].members;