From 5306d6fe2c691fb4f2d5ce3306df4080312cf3ec Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 28 May 2024 18:16:38 +0200 Subject: [PATCH] fix: remove pending crown from results that wont be sent to the server --- frontend/src/ts/test/result.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/test/result.ts b/frontend/src/ts/test/result.ts index 2505905b8..612af48c9 100644 --- a/frontend/src/ts/test/result.ts +++ b/frontend/src/ts/test/result.ts @@ -372,8 +372,8 @@ export function updateCrownType(type: PbCrown.CrownType): void { PbCrown.update(type); } -export async function updateCrown(): Promise { - if (Config.mode === "quote") { +export async function updateCrown(dontSave: boolean): Promise { + if (Config.mode === "quote" || dontSave) { hideCrown(); return; } @@ -857,7 +857,7 @@ export async function update( updateTestType(randomQuote); updateQuoteSource(randomQuote); updateQuoteFavorite(randomQuote); - await updateCrown(); + await updateCrown(dontSave); await updateGraph(); await updateGraphPBLine(); await updateTags(dontSave);