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

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

Loading…
Cancel
Save