mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Moved show counters to directive (#8537)
* Moved show counters to directive - hide counters on challenge page - hide counters on group page * Changed let to var
This commit is contained in:
@@ -72,7 +72,19 @@
|
||||
$scope.showChallengeList = function () {
|
||||
return $state.includes("options.social.challenges");
|
||||
};
|
||||
|
||||
$scope.showDoubleTaskCounter = function (task, obj) {
|
||||
var objectIsGroup = obj.type && (obj.type === 'guild' || obj.type === 'party');
|
||||
var objectIsChallenge = $state.includes("options.social.challenges");
|
||||
return !objectIsGroup && !objectIsChallenge && task.up && task.down;
|
||||
};
|
||||
|
||||
$scope.showSingleTaskCounter = function (task, obj) {
|
||||
var objectIsGroup = obj.type && (obj.type === 'guild' || obj.type === 'party');
|
||||
var objectIsChallenge = $state.includes("options.social.challenges");
|
||||
return !objectIsGroup && !objectIsChallenge && task.type === "habit" && (!task.up || !task.down);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
}());
|
||||
Reference in New Issue
Block a user