This commit is contained in:
2023-12-18 10:06:01 +08:00
parent 8803550eb9
commit 4a85eaaa07
2 changed files with 7 additions and 6 deletions

View File

@@ -151,20 +151,21 @@ const queue = computed(() => {
.OrderByDescending((q) => q.from == QueueFrom.Manual)
switch (settings.value.sortType) {
case QueueSortType.TimeFirst: {
list = list.OrderByDescending((q) => q.createAt)
list = list.ThenBy((q) => q.createAt)
break
}
case QueueSortType.GuardFirst: {
list = list.OrderBy((q) => q.user?.guard_level).ThenByDescending((q) => q.createAt)
list = list.OrderBy((q) => q.user?.guard_level).ThenBy((q) => q.createAt)
break
}
case QueueSortType.PaymentFist: {
list = list.OrderByDescending((q) => q.giftPrice ?? 0).ThenByDescending((q) => q.createAt)
list = list.OrderByDescending((q) => q.giftPrice ?? 0).ThenBy((q) => q.createAt)
}
}
if (configCanEdit.value ? settings.value.isReverse : isReverse.value) {
list = list.Reverse()
}
list = list.OrderByDescending((q) => q.status == QueueStatus.Progressing ? 1 : 0)
return list.ToArray()
})
const historySongs = computed(() => {