This commit is contained in:
2026-08-08 18:56:53 +03:30
commit bf5c561a24
276 changed files with 31671 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
export function getStudentDeckComparator(priority = null) {
return function compareStudentDeck(sd1, sd2) {
return (
(priority && sd2.deck.prioritized - sd1.deck.prioritized) ||
sd2.reviewCardCount - sd1.reviewCardCount ||
sd2.newCardCount - sd1.newCardCount ||
sd2.deck.cardCount - sd1.deck.cardCount
);
};
}
export function compareChapter(ch1, ch2) {
return (
ch2.reviewCardCount - ch1.reviewCardCount ||
ch2.newCardCount - ch1.newCardCount ||
ch2.cardCount - ch1.cardCount
);
}