qa: Don't append difficulty and/or timecount if we select another state

This commit is contained in:
nemunaire 2023-11-26 20:42:38 +01:00
parent d4cad767eb
commit 1a6209e58d
1 changed files with 6 additions and 4 deletions

View File

@ -20,10 +20,12 @@
creationInProgress = true;
const myContent = newQuery.content;
if (!newQuery.content) newQuery.content = "";
if (newQuery.difficulty)
newQuery.content = "Difficulté : " + newQuery.difficulty + "\n" + newQuery.content;
if (newQuery.timecount)
newQuery.content = "Temps passé : " + newQuery.timecount + "\n" + newQuery.content;
if (newQuery.state == "timer") {
if (newQuery.difficulty)
newQuery.content = "Difficulté : " + newQuery.difficulty + "\n" + newQuery.content;
if (newQuery.timecount)
newQuery.content = "Temps passé : " + newQuery.timecount + "\n" + newQuery.content;
}
newQuery.save().then(async (res) => {
newQuery = new QAQuery();
creationInProgress = false;