mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
Fix multiple sell buttons appearing simultanously when clicking on food + egg or potion
This commit is contained in:
parent
13131087ff
commit
de2c0280b2
1 changed files with 3 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
|
|||
} else {
|
||||
$scope.hatch(eggData, $scope.selectedPotion);
|
||||
}
|
||||
$scope.selectedFood = null;
|
||||
}
|
||||
|
||||
$scope.choosePotion = function(potion){
|
||||
|
|
@ -53,11 +54,13 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
|
|||
} else {
|
||||
$scope.hatch($scope.selectedEgg, potionData);
|
||||
}
|
||||
$scope.selectedFood = null;
|
||||
}
|
||||
|
||||
$scope.chooseFood = function(food){
|
||||
if ($scope.selectedFood && $scope.selectedFood.key == food) return $scope.selectedFood = null;
|
||||
$scope.selectedFood = Content.food[food];
|
||||
$scope.selectedEgg = $scope.selectedPotion = null;
|
||||
}
|
||||
|
||||
$scope.sellInventory = function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue