emit event when user is synced and update code to use it

This commit is contained in:
Matteo Pagliazzi
2013-11-12 16:23:21 +01:00
parent 5ddf54466c
commit d797c21075
2 changed files with 6 additions and 4 deletions

View File

@@ -68,6 +68,9 @@ angular.module('userServices', []).
_.extend(user, data);
$rootScope.$emit('userUpdated', user);
}
// Emit event when user syncing ended
$rootScope.$emit('userSynced');
user._v = data._v;
// FIXME handle this somewhere else, we don't need to check every single time