Skip to content
Snippets Groups Projects
Unverified Commit 951e8baa authored by Garrit Franke's avatar Garrit Franke Committed by GitHub
Browse files

Fix typo (#728)

parent d6b212f4
No related branches found
No related tags found
No related merge requests found
...@@ -512,7 +512,7 @@ object LocalData { ...@@ -512,7 +512,7 @@ object LocalData {
} }
} }
fun inititalTestResultReceivedTimestamp(value: Long) = fun initialTestResultReceivedTimestamp(value: Long) =
getSharedPreferenceInstance().edit(true) { getSharedPreferenceInstance().edit(true) {
putLong( putLong(
CoronaWarnApplication.getAppContext() CoronaWarnApplication.getAppContext()
...@@ -521,7 +521,7 @@ object LocalData { ...@@ -521,7 +521,7 @@ object LocalData {
) )
} }
fun inititalTestResultReceivedTimestamp(): Long? { fun initialTestResultReceivedTimestamp(): Long? {
val timestamp = getSharedPreferenceInstance().getLong( val timestamp = getSharedPreferenceInstance().getLong(
CoronaWarnApplication.getAppContext() CoronaWarnApplication.getAppContext()
.getString(R.string.preference_initial_result_received_time), .getString(R.string.preference_initial_result_received_time),
......
...@@ -40,11 +40,11 @@ object SubmissionRepository { ...@@ -40,11 +40,11 @@ object SubmissionRepository {
LocalData.isAllowedToSubmitDiagnosisKeys(true) LocalData.isAllowedToSubmitDiagnosisKeys(true)
} }
val initialTestResultReceivedTimestamp = LocalData.inititalTestResultReceivedTimestamp() val initialTestResultReceivedTimestamp = LocalData.initialTestResultReceivedTimestamp()
if (initialTestResultReceivedTimestamp == null) { if (initialTestResultReceivedTimestamp == null) {
val currentTime = System.currentTimeMillis() val currentTime = System.currentTimeMillis()
LocalData.inititalTestResultReceivedTimestamp(currentTime) LocalData.initialTestResultReceivedTimestamp(currentTime)
testResultReceivedDate.value = Date(currentTime) testResultReceivedDate.value = Date(currentTime)
if (testResult == TestResult.PENDING) { if (testResult == TestResult.PENDING) {
BackgroundWorkScheduler.startWorkScheduler() BackgroundWorkScheduler.startWorkScheduler()
......
...@@ -116,7 +116,7 @@ class SubmissionViewModel : ViewModel() { ...@@ -116,7 +116,7 @@ class SubmissionViewModel : ViewModel() {
deleteTestGUID() deleteTestGUID()
SubmissionService.deleteRegistrationToken() SubmissionService.deleteRegistrationToken()
LocalData.isAllowedToSubmitDiagnosisKeys(false) LocalData.isAllowedToSubmitDiagnosisKeys(false)
LocalData.inititalTestResultReceivedTimestamp(0L) LocalData.initialTestResultReceivedTimestamp(0L)
} }
private fun executeRequestWithState( private fun executeRequestWithState(
......
...@@ -14,7 +14,6 @@ import org.junit.After ...@@ -14,7 +14,6 @@ import org.junit.After
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test
class CameraPermissionHelperTest { class CameraPermissionHelperTest {
@MockK @MockK
...@@ -26,7 +25,6 @@ class CameraPermissionHelperTest { ...@@ -26,7 +25,6 @@ class CameraPermissionHelperTest {
mockkObject(CoronaWarnApplication) mockkObject(CoronaWarnApplication)
} }
/** /**
* Test call order is correct. * Test call order is correct.
*/ */
...@@ -50,4 +48,4 @@ class CameraPermissionHelperTest { ...@@ -50,4 +48,4 @@ class CameraPermissionHelperTest {
fun cleanUp() { fun cleanUp() {
unmockkAll() unmockkAll()
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment