Skip to content

Commit 3cf06af

Browse files
Merge pull request #40 from kirill-markin/codex/fix-android-review-session-complete
Fix Android review session completion
2 parents c309c1a + 0eb3d7f commit 3cf06af

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • apps/android/feature/review/src/main/java/com/flashcardsopensourceapp/feature/review

apps/android/feature/review/src/main/java/com/flashcardsopensourceapp/feature/review/ReviewViewModel.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class ReviewViewModel(
202202
)
203203
val emptyState = resolveReviewEmptyState(
204204
selectedFilter = sessionSnapshot.selectedFilter,
205+
remainingCount = sessionSnapshot.remainingCount,
205206
totalCount = sessionSnapshot.totalCount,
206207
workspaceCardCount = appMetadata.cardCount
207208
)
@@ -918,13 +919,18 @@ private fun applyResolvedReviewFilter(
918919

919920
private fun resolveReviewEmptyState(
920921
selectedFilter: ReviewFilter,
922+
remainingCount: Int,
921923
totalCount: Int,
922924
workspaceCardCount: Int
923925
): ReviewEmptyState? {
924-
if (totalCount > 0) {
926+
if (remainingCount > 0) {
925927
return null
926928
}
927929

930+
if (totalCount > 0) {
931+
return ReviewEmptyState.SESSION_COMPLETE
932+
}
933+
928934
if (workspaceCardCount == 0) {
929935
return ReviewEmptyState.NO_CARDS_YET
930936
}

0 commit comments

Comments
 (0)