diff --git a/frontend/src/views/social/VocabCourseView.vue b/frontend/src/views/social/VocabCourseView.vue index ec412e8..5c7c6b4 100755 --- a/frontend/src/views/social/VocabCourseView.vue +++ b/frontend/src/views/social/VocabCourseView.vue @@ -455,13 +455,16 @@ export default { srsDailyCount() { // A valid current-day session represents the fixed daily batch. Without // one, the server's due count determines the first batch (max. 50). - if (Number.isFinite(Number(this.srsTodayRemaining))) { + // A zero-card session is never a valid batch while the server still + // reports due items. Otherwise the UI can incorrectly show "0 of 0" + // even though there is a backlog to start today. + if (this.srsDailyQuota > 0 && Number.isFinite(Number(this.srsTodayRemaining))) { return Math.max(0, Number(this.srsTodayRemaining)); } return Math.min(this.srsDueCount, this.srsDailyLimit); }, srsDailyQuota() { - if (Number.isFinite(Number(this.srsTodayQuota))) { + if (Number.isFinite(Number(this.srsTodayQuota)) && Number(this.srsTodayQuota) > 0) { return Math.max(0, Number(this.srsTodayQuota)); } return Math.min(this.srsDueCount, this.srsDailyLimit); @@ -1028,7 +1031,10 @@ export default { onClose: () => this.refreshHardVocabList() }); }, - openSrsPractice() { + async openSrsPractice() { + // Refresh immediately before opening. The status dialog may have been + // opened while a stale empty session was still in local storage. + await this.loadSrsDueItems(); if (!this.srsDueItems.length) { return; }