merge-requests/170/head
Faiz Hashmi 3 years ago
parent 5d98f0219f
commit 7d0c5598a0

@ -279,8 +279,8 @@ class MarathonProvider extends ChangeNotifier {
oneSec, oneSec,
(Timer timer) async { (Timer timer) async {
if (totalSecondsToWaitForWinner == 1) { if (totalSecondsToWaitForWinner == 1) {
await callGetSelectedWinnersApi().whenComplete(() => updateQuestionCardStatus(QuestionCardStatus.winnerFound));
timer.cancel(); timer.cancel();
await callGetSelectedWinnersApi().whenComplete(() => updateQuestionCardStatus(QuestionCardStatus.winnerFound));
return; return;
} else if (totalSecondsToWaitForWinner == 15) { } else if (totalSecondsToWaitForWinner == 15) {
totalSecondsToWaitForWinner--; totalSecondsToWaitForWinner--;
@ -353,12 +353,15 @@ class MarathonProvider extends ChangeNotifier {
gapTimeImage = currentQuestion.gapImage; gapTimeImage = currentQuestion.gapImage;
gapTimeText = currentQuestion.gapText; gapTimeText = currentQuestion.gapText;
gapTimeType = currentQuestion.gapType; gapTimeType = currentQuestion.gapType;
startTimerForQuestion();
updateCardData();
if (Utils.isLoading) { if (Utils.isLoading) {
Utils.hideLoading(AppRoutes.navigatorKey.currentContext!); Utils.hideLoading(AppRoutes.navigatorKey.currentContext!);
} }
startTimerForQuestion(); if (!AppState().getIsDemoMarathon) {
updateCardData(); totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!);
totalMarathoners = await MarathonApiClient().getMarathonersCount(marathonId: marathonDetailModel.id!); }
Navigator.pushReplacementNamed(AppRoutes.navigatorKey.currentContext!, AppRoutes.marathonScreen); Navigator.pushReplacementNamed(AppRoutes.navigatorKey.currentContext!, AppRoutes.marathonScreen);
} else { } else {
currentQuestion = AppState().getIsDemoMarathon currentQuestion = AppState().getIsDemoMarathon

Loading…
Cancel
Save