mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-16 08:52:17 +00:00
use updateStore outside of user.fns (habitrpg-shared#5d39056)
This commit is contained in:
parent
b9f8ae3f62
commit
07a27d1c22
2 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue