-
Notifications
You must be signed in to change notification settings - Fork 494
Grey card undetermine state without wifi (DEV, EXPOSUREAPP-3892) #1686
Grey card undetermine state without wifi (DEV, EXPOSUREAPP-3892) #1686
Conversation
issue is under investigation. (DRAFT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked on my device 👍
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/storage/RiskLevelRepository.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me and seems to resolve EXPOSUREAPP-3892 as well. 👍
…core instead of calling method multiple times
25c1d40
* Set the internal risk level score [internalRisklevelScore] | ||
*/ | ||
private fun setInternalRiskLevelScore(): MutableStateFlow<Int> { | ||
val lastSuccessfullyCalculatedScore = getLastCalculatedScore().raw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I still don't get though, why we do this here in the Repo and not at the source in LocalData.lastCalculatedRiskLevel().
Currently, we have overwriting behavior in multiple places. Am I missing sth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think you're correct and I have adjusted the code to match this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralfgehrer @InterestedParties
what do you think about the UNDETERMINED state now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BMItter not quite sure I understand your question.
This is what it says in our code. Hence, initializing sth with that value is probably not the best idea.
// mapped to no UI state
// this should never happen
UNDETERMINED(RiskLevelConstants.UNDETERMINED);
device Tests looking good so far (with & without connection). We still need to check for sideeffects... |
@@ -14,7 +14,6 @@ object RiskLevelRepository { | |||
MutableStateFlow(LocalData.lastSuccessfullyCalculatedRiskLevel().raw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we access LocalData.lastSuccessfullyCalculatedRiskLevel().raw
directly whereas we use getLastSuccessfullyCalculatedScore().raw
in line 10 doing the same thing.
We should align this.
In #1699 the UNKOWN_RISKS ARE removed, so do we even need this PR? @BMItter @SamuraiKek @ralfgehrer @d4rken |
Maybe wait with this until #1705 is merged. The whole |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Ticket was set to "obsolete", will close this PR. |
Quick fix for grey card state (1.8.x RC)