Skip to content

Commit

Permalink
bfix: acceptance graph not updating correctly (#105)
Browse files Browse the repository at this point in the history
bfix: acceptance graph updating correctly
  • Loading branch information
aman-singh7 authored Nov 10, 2022
2 parents 1cca675 + 750192a commit 5c802e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/presentation/profile/bloc/profile_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
return;
}

_activity.clear();
for (final activity in activityDetails ?? <ActivityDetails>[]) {
if (activity.createdAt == null) continue;
_activity[activity.createdAt!] = activity.correct;
Expand Down
3 changes: 2 additions & 1 deletion lib/presentation/profile/widgets/acceptance_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class AcceptanceGraph extends StatelessWidget {
return BlocBuilder<ProfileBloc, ProfileState>(
buildWhen: (previous, current) {
return (previous.currentYear != current.currentYear) ||
(previous.currentTriplet != current.currentTriplet);
(previous.currentTriplet != current.currentTriplet) ||
(previous.user != current.user);
},
builder: (context, state) {
final bloc = context.read<ProfileBloc>();
Expand Down

0 comments on commit 5c802e8

Please sign in to comment.