diff --git a/lib/ui/marathon/marathon_provider.dart b/lib/ui/marathon/marathon_provider.dart index 8b9e6af..65b9353 100644 --- a/lib/ui/marathon/marathon_provider.dart +++ b/lib/ui/marathon/marathon_provider.dart @@ -195,7 +195,6 @@ class MarathonProvider extends ChangeNotifier { if (isUserWaiting) { MarathonApiClient().joinMarathonAsParticipant().whenComplete(() async { await callNextQuestionApi(); - totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!); }); } else { isButtonEnabled = false; @@ -359,6 +358,7 @@ class MarathonProvider extends ChangeNotifier { } startTimerForQuestion(); updateCardData(); + totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!); Navigator.pushReplacementNamed(AppRoutes.navigatorKey.currentContext!, AppRoutes.marathonScreen); } else { currentQuestion = AppState().getIsDemoMarathon