fix: consider an activity active for a user only if they haven't completed their role, don't show button text in activity dropdown if use has no role
This commit is contained in:
parent
5f42aa9568
commit
7878bd9b71
3 changed files with 7 additions and 4 deletions
|
|
@ -64,7 +64,9 @@ class ActivityStatsMenu extends StatelessWidget {
|
|||
final isColumnMode = FluffyThemes.isColumnMode(context);
|
||||
|
||||
// Completion status variables
|
||||
final bool userComplete = controller.room.hasCompletedRole;
|
||||
final bool userComplete =
|
||||
controller.room.hasPickedRole && controller.room.hasCompletedRole;
|
||||
|
||||
final bool activityComplete = controller.room.isActivityFinished;
|
||||
bool shouldShowEndForAll = true;
|
||||
bool shouldShowImDone = true;
|
||||
|
|
@ -160,7 +162,7 @@ class ActivityStatsMenu extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (!userComplete) ...[
|
||||
if (!userComplete && (shouldShowImDone || shouldShowEndForAll)) ...[
|
||||
Text(
|
||||
L10n.of(context).activityDropdownDesc,
|
||||
textAlign: TextAlign.center,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ extension CoursePlanRoomExtension on Room {
|
|||
final room = client.getRoomById(child.roomId!);
|
||||
if (room?.membership == Membership.join &&
|
||||
room?.activityId == activityId &&
|
||||
!room!.hasArchivedActivity) {
|
||||
room!.hasPickedRole &&
|
||||
!room.hasCompletedRole) {
|
||||
return room.id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ description: Learn a language while texting your friends.
|
|||
# Pangea#
|
||||
publish_to: none
|
||||
# On version bump also increase the build number for F-Droid
|
||||
version: 4.1.16+4
|
||||
version: 4.1.16+5
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue