mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 02:02:19 +00:00
add group by for hatchable sort (#11459)
* add group by for hatchable sort * fix display bug when pets are owned
This commit is contained in:
parent
dfd79c9c1a
commit
cf00bddd6f
1 changed files with 3 additions and 2 deletions
|
|
@ -767,7 +767,6 @@ export default {
|
|||
case 'sortByHatchable': {
|
||||
if (isPetList) {
|
||||
const sortFunc = i => (i.isHatchable() ? 0 : 1);
|
||||
|
||||
animals = _sortBy(animals, [sortFunc]);
|
||||
}
|
||||
break;
|
||||
|
|
@ -800,8 +799,10 @@ export default {
|
|||
groupKey = 'potionKey';
|
||||
} else if (sortBy === 'AZ') {
|
||||
groupKey = '';
|
||||
} else if (sortBy === 'sortByHatchable') {
|
||||
groupKey = i => (i.isHatchable() ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
return groupBy(pets, groupKey);
|
||||
},
|
||||
mounts (animalGroup, hideMissing, sortBy, searchText) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue