You will never get details += "n/a"
executed for two reasons:
You're assigning
hasFinished
totrue
in theif
(as other people point):else if (hasFinished = true)
It should be
else if (hasFinished)
Most important than this, your code has this form:
if (false) { ... } else { if (true) { } else { //this is false, it was supposed to be hitted before } }
So even if you do the first fix, the logic behind doesn't have any sense. You should use another evaluation in the second if
to handle the last else
statement. For example:
if (!hasFinished) {
...
} else {
//the hasFinished usage here has no sense, being commented
//just left it to show this is supported
//if (hasFinished && someValue <= someOtherValue) {
if (someValue <= someOtherValue) {
...
} else {
...
}
}