Doesn't skip if answered wrong

This commit is contained in:
BOT Alex 2023-08-27 06:30:02 +02:00
parent 46664fac59
commit 8fec07b3d5

View file

@ -62,7 +62,7 @@
@for (int i = 0; i < Answers.Length; i++)
{
int buttonIndex = i;
<MudButton Class="PinyinButtons ma-3"
<MudButton Class="PinyinButtons ma-3"
Variant="Variant.Outlined"
@onclick="() => SelectButton(buttonIndex)"
Color="@(Answers[buttonIndex].isSelected ? Color.Primary : Color.Default)">
@ -91,6 +91,10 @@
{
<MudText Typo="Typo.caption">• Easy mode enabled</MudText>
}
@if (useChagingFonts)
{
<MudText Typo="Typo.caption">• Changing fonts enabled</MudText>
}
</MudStack>
</MudContainer>
</MudStack>
@ -313,7 +317,18 @@
await SaveContinueData();
GenerateQuestion();
if (isCorrect)
{
GenerateQuestion();
}
else
{
foreach (var anwser in Answers)
{
anwser.isSelected = false;
}
StateHasChanged();
}
}
async Task SaveContinueData()