Skip to content

Commit 75d5e93

Browse files
committed
Fix banner sorting
1 parent e3d9806 commit 75d5e93

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/commands/misc/banners.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,12 @@ export function parseEventWishNews(news: StoredNews, recent = true): void {
433433
// Logger.info("Added", wish)
434434

435435
eventWishes = eventWishes.sort((a, b) => {
436-
if (Math.abs(a.roughDate - b.roughDate) < 3600)
437-
return a.title.includes("Epitome") ? 1 : -1
438-
else
436+
if (Math.abs(a.roughDate - b.roughDate) < 3600) {
437+
if (a.duration == b.duration)
438+
return a.title.includes("Epitome") ? 1 : -1
439+
440+
return b.duration.localeCompare(a.duration)
441+
} else
439442
return a.roughDate - b.roughDate
440443
})
441444
} else if (recent)

0 commit comments

Comments
 (0)