use updateStore outside of user.fns (habitrpg-shared#5d39056)

This commit is contained in:
Tyler Renelle
2013-12-15 22:38:08 -07:00
parent b9f8ae3f62
commit 07a27d1c22
2 changed files with 4 additions and 4 deletions

View File

@@ -76,13 +76,13 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
------------------------
*/
$rootScope.$on('userSynced', function(){
$scope.itemStore = User.user.fns.updateStore();
$scope.$watch('user.items.gear.equipped', function(){
$scope.itemStore = $rootScope.Shared.updateStore(User.user);
})
$scope.buy = function(item) {
User.user.ops.buy({params:{key:item.key}});
$scope.itemStore = User.user.fns.updateStore();
$scope.itemStore = $rootScope.Shared.updateStore(User.user);
};

View File

@@ -24,7 +24,7 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
User.user.ops.changeClass({query:{class:klass}});
$scope.selectedClass = undefined;
User.user.fns.updateStore();
$rootScope.Shared.updateStore(User.user);
$state.go('options.profile.stats');
}