From 616cf41017d112f7bc3896b3cea40e64fd45faa4 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 15 Dec 2013 23:17:09 -0700 Subject: [PATCH] MOBILE_APP on static, deep-watch user.items.gear.equipped --- public/js/controllers/tasksCtrl.js | 4 ++-- public/js/static.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/js/controllers/tasksCtrl.js b/public/js/controllers/tasksCtrl.js index eb20922ce1..db289cdf01 100644 --- a/public/js/controllers/tasksCtrl.js +++ b/public/js/controllers/tasksCtrl.js @@ -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); }; diff --git a/public/js/static.js b/public/js/static.js index 8e4269fe80..fa38902ee6 100644 --- a/public/js/static.js +++ b/public/js/static.js @@ -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') \ No newline at end of file + .constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings') + .constant("MOBILE_APP", false) \ No newline at end of file