if user has completed all activities in topic, always unlock next topic
This commit is contained in:
parent
9ad8266314
commit
cdad9bfef8
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue