Skip to content

Commit

Permalink
fixed outdated usage of eventtrackerdto and indexing in completed cell
Browse files Browse the repository at this point in the history
  • Loading branch information
cathli66 committed Apr 18, 2024
1 parent 514f720 commit f23b714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion game/lib/profile/completed_challenge_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CompletedChallengeFull extends StatefulWidget {

class _CompletedChallengeFullState extends State<CompletedChallengeFull> {
final GlobalKey<CarouselSliderState> _carouselKey = GlobalKey();
int _currentIndex = 2;
int _currentIndex = 0;

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions game/lib/profile/completed_challenges_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ class CompletedChallengesPage extends StatelessWidget {
if (tracker == null || event == null) {
continue;
}
if (tracker.prevChallengeDates!.length !=
event.challenges!.length) {
if (tracker.prevChallenges!.length != event.challenges!.length) {
continue;
}

var completedDate = tracker.prevChallengeDates!.last;
var completedDate = tracker.prevChallenges.last.dateCompleted;
DateTime date =
DateFormat("E, d MMM y HH:mm:ss").parse(completedDate);

Expand Down

0 comments on commit f23b714

Please sign in to comment.