qa: Don't append difficulty and/or timecount if we select another state
This commit is contained in:
parent
d4cad767eb
commit
1a6209e58d
@ -20,10 +20,12 @@
|
|||||||
creationInProgress = true;
|
creationInProgress = true;
|
||||||
const myContent = newQuery.content;
|
const myContent = newQuery.content;
|
||||||
if (!newQuery.content) newQuery.content = "";
|
if (!newQuery.content) newQuery.content = "";
|
||||||
|
if (newQuery.state == "timer") {
|
||||||
if (newQuery.difficulty)
|
if (newQuery.difficulty)
|
||||||
newQuery.content = "Difficulté : " + newQuery.difficulty + "\n" + newQuery.content;
|
newQuery.content = "Difficulté : " + newQuery.difficulty + "\n" + newQuery.content;
|
||||||
if (newQuery.timecount)
|
if (newQuery.timecount)
|
||||||
newQuery.content = "Temps passé : " + newQuery.timecount + "\n" + newQuery.content;
|
newQuery.content = "Temps passé : " + newQuery.timecount + "\n" + newQuery.content;
|
||||||
|
}
|
||||||
newQuery.save().then(async (res) => {
|
newQuery.save().then(async (res) => {
|
||||||
newQuery = new QAQuery();
|
newQuery = new QAQuery();
|
||||||
creationInProgress = false;
|
creationInProgress = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user