mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 00:12:17 +00:00
MOBILE_APP on static, deep-watch user.items.gear.equipped
This commit is contained in:
parent
07a27d1c22
commit
616cf41017
2 changed files with 4 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'API_URL',
|
||||
function($scope, $rootScope, $location, User, Notification, $http, API_URL) {
|
||||
$scope.obj = User.user; // used for task-lists
|
||||
$scope.user = User.user;
|
||||
|
||||
$scope.score = function(task, direction) {
|
||||
User.user.ops.score({params:{id: task.id, direction:direction}})
|
||||
|
|
@ -78,11 +79,10 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
|||
|
||||
$scope.$watch('user.items.gear.equipped', function(){
|
||||
$scope.itemStore = $rootScope.Shared.updateStore(User.user);
|
||||
})
|
||||
},true);
|
||||
|
||||
$scope.buy = function(item) {
|
||||
User.user.ops.buy({params:{key:item.key}});
|
||||
$scope.itemStore = $rootScope.Shared.updateStore(User.user);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
window.habitrpg = angular.module('habitrpg', ['notificationServices', 'userServices', 'chieffancypants.loadingBar'])
|
||||
.constant("API_URL", "")
|
||||
.constant("STORAGE_USER_ID", 'habitrpg-user')
|
||||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||
.constant("MOBILE_APP", false)
|
||||
Loading…
Reference in a new issue