Commit fc11e5b1 authored by 郑磊's avatar 郑磊

更新最大日期逻辑

parent 4d0129f0
......@@ -148,6 +148,7 @@ export function setupChannel(filterGetter?: () => UserFilter[] | undefined | nul
const dateGrouped: Record<number, DatePromotedData> = {}
raw.list.forEach((promoted) => {
const date = getCrownDayStart(promoted.match_time)
maxDate.value = Math.max(getCrownDayStart(), date, maxDate.value)
if (!dateGrouped[date]) {
dateGrouped[date] = {
hasNewPromoted: false,
......@@ -166,6 +167,7 @@ export function setupChannel(filterGetter?: () => UserFilter[] | undefined | nul
const result: PromotedData[] = []
for (const promoted of reversed) {
const date = getCrownDayStart(promoted.match_time)
maxDate.value = Math.max(getCrownDayStart(), date, maxDate.value)
if (!dateData.value[date]) {
dateData.value[date] = {
hasNewPromoted: true,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment