summary refs log tree commit diff
path: root/webclient/home/home-controller.js
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-26 16:03:25 +0100
committerErik Johnston <erik@matrix.org>2014-08-26 16:03:25 +0100
commitb1e98ddc093b04967dffa58a58c2bfee624870b8 (patch)
tree1b850cf728afa2f97859429b110a043bc1fdf63e /webclient/home/home-controller.js
parentMerge branch 'develop' of github.com:matrix-org/synapse into stream_refactor (diff)
parentAvoid double call of refresh at app startup (diff)
downloadsynapse-b1e98ddc093b04967dffa58a58c2bfee624870b8.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
Diffstat (limited to 'webclient/home/home-controller.js')
-rw-r--r--webclient/home/home-controller.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js
index a5576759fa..867ae522a6 100644
--- a/webclient/home/home-controller.js
+++ b/webclient/home/home-controller.js
@@ -76,9 +76,9 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload',
         return data;
     };
 
-    $scope.refresh = function() {
+    var refresh = function() {
         // List all rooms joined or been invited to
-        matrixService.rooms().then(
+        matrixService.rooms(1,true).then(
             function(response) {
                 var data = assignRoomAliases(response.data.rooms);
                 $scope.feedback = "Success";
@@ -118,7 +118,7 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload',
                 response.data.room_id);
                 matrixService.createRoomIdToAliasMapping(
                     response.data.room_id, response.data.room_alias);
-                $scope.refresh();
+                refresh();
             },
             function(error) {
                 $scope.feedback = "Failure: " + error.data;
@@ -158,5 +158,7 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload',
         );
     };
  
-    $scope.refresh();
+    $scope.onInit = function() {
+        refresh();
+    };
 }]);