mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:04:59 -04:00
Event streaming now happens on an app level, rather than a per-room level. Make eventStreamService manage it's own repolling provided no one calls stop() on it. Couple the stream with eventHandlerService so any controller can just blithely call eventStreamService.resume() and expect to 'get stuff' without having to handle promises (though resume() still returns a promise for that request and proxies it through $q). Kill and reset the stream if you logout.
This commit is contained in:
parent
c51cf4efca
commit
7ddb7a5cbb
5 changed files with 76 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
angular.module('LoginController', ['matrixService'])
|
||||
.controller('LoginController', ['$scope', '$location', 'matrixService',
|
||||
function($scope, $location, matrixService) {
|
||||
.controller('LoginController', ['$scope', '$location', 'matrixService', 'eventStreamService',
|
||||
function($scope, $location, matrixService, eventStreamService) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ angular.module('LoginController', ['matrixService'])
|
|||
|
||||
// And permanently save it
|
||||
matrixService.saveConfig();
|
||||
|
||||
eventStreamService.resume();
|
||||
// Go to the user's rooms list page
|
||||
$location.path("rooms");
|
||||
},
|
||||
|
@ -83,6 +83,7 @@ angular.module('LoginController', ['matrixService'])
|
|||
access_token: response.data.access_token
|
||||
});
|
||||
matrixService.saveConfig();
|
||||
eventStreamService.resume();
|
||||
$location.path("rooms");
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue