Tasks sort delete fix (#8526)

* Fixed task sorting

* Add sync when group task is deleted

* Added sync when user tasks reorder

* Abstracted show logic and removed task grouping from group page

* Fixed scope typo

* Localized the default challenge short name

* Removed default shortName

* Fixed test for challenge shortName
This commit is contained in:
Keith Holliday
2017-03-07 14:28:49 -07:00
committed by GitHub
parent 28c93ea869
commit b75c57f130
7 changed files with 25 additions and 19 deletions

View File

@@ -65,14 +65,22 @@
return $scope.obj[list.type+'s'];
};
$scope.showNormalList = function () {
return !$state.includes("options.social.challenges") && !User.user.preferences.tasks.groupByChallenge;
};
function objIsGroup (obj) {
return obj && obj.type && (obj.type === 'guild' || obj.type === 'party');
}
$scope.showNormalList = function (obj) {
return objIsGroup(obj) || (!$state.includes("options.social.challenges") && !User.user.preferences.tasks.groupByChallenge);
}
$scope.showChallengeList = function () {
return $state.includes("options.social.challenges");
};
$scope.showGroupedList = function (obj) {
return User.user.preferences.tasks.groupByChallenge && !$state.includes("options.social.challenges") && !objIsGroup(obj);
}
$scope.showDoubleTaskCounter = function (task, obj) {
var objectIsGroup = obj.type && (obj.type === 'guild' || obj.type === 'party');
var objectIsChallenge = $state.includes("options.social.challenges");