Skip to content

Commit 4e54022

Browse files
committed
TaskRepository.kt: Fix pagination filtering logic
Should be flipped around, whoops 🙃
1 parent f1346ab commit 4e54022

File tree

1 file changed

+2
-2
lines changed
  • features/tasks/data/src/main/kotlin/com/edricchan/studybuddy/features/tasks/data/repo

1 file changed

+2
-2
lines changed

features/tasks/data/src/main/kotlin/com/edricchan/studybuddy/features/tasks/data/repo/TaskRepository.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ class TaskRepository @Inject constructor(
108108
// flow {} is used here as we need a suspending context for the
109109
// getCollectionRef call
110110
val query = source.getCollectionRef().let {
111-
if (!config.includeArchived) it.whereEqualTo(
111+
if (config.includeArchived) it.whereEqualTo(
112112
TodoItem.Field.IsArchived.fieldName,
113113
true
114114
) else it
115115
}.let {
116116
if (config.excludeCompleted) it.whereEqualTo(
117117
TodoItem.Field.IsDone.fieldName,
118-
true
118+
false
119119
) else it
120120
}.let {
121121
config.orderByFields.fold(it) { query, spec ->

0 commit comments

Comments
 (0)