if user has completed all activities in topic, always unlock next topic

This commit is contained in:
ggurdin 2026-01-06 13:17:32 -05:00
parent 9ad8266314
commit cdad9bfef8
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -158,6 +158,10 @@ mixin ActivitySummariesProvider<T extends StatefulWidget> on State<T> {
final completedTopicActivities =
_completedActivities(userID).intersection(topicActivityIds);
if (completedTopicActivities.length >= topicActivityIds.length) {
return true;
}
if (activitiesToCompleteOverride != null) {
return completedTopicActivities.length >= activitiesToCompleteOverride;
}
@ -165,6 +169,7 @@ mixin ActivitySummariesProvider<T extends StatefulWidget> on State<T> {
final numTwoPersonActivities = topic.loadedActivities.values
.where((a) => a.req.numberOfParticipants <= 2)
.length;
return completedTopicActivities.length >= numTwoPersonActivities;
}