Skip to content
Snippets Groups Projects
Commit 2492a68f authored by Matthias Urhahn's avatar Matthias Urhahn
Browse files

Remove unused function that caused build errors.

parent 04cd061b
No related branches found
No related tags found
No related merge requests found
...@@ -15,13 +15,10 @@ import de.rki.coronawarnapp.task.TaskFactory ...@@ -15,13 +15,10 @@ import de.rki.coronawarnapp.task.TaskFactory
import de.rki.coronawarnapp.task.TaskFactory.Config.CollisionBehavior import de.rki.coronawarnapp.task.TaskFactory.Config.CollisionBehavior
import de.rki.coronawarnapp.util.TimeStamper import de.rki.coronawarnapp.util.TimeStamper
import de.rki.coronawarnapp.util.ui.toLazyString import de.rki.coronawarnapp.util.ui.toLazyString
import de.rki.coronawarnapp.worker.BackgroundWorkHelper
import kotlinx.coroutines.channels.ConflatedBroadcastChannel import kotlinx.coroutines.channels.ConflatedBroadcastChannel
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.first
import org.joda.time.DateTime
import org.joda.time.DateTimeZone
import org.joda.time.Duration import org.joda.time.Duration
import org.joda.time.Instant import org.joda.time.Instant
import timber.log.Timber import timber.log.Timber
...@@ -168,25 +165,6 @@ class DownloadDiagnosisKeysTask @Inject constructor( ...@@ -168,25 +165,6 @@ class DownloadDiagnosisKeysTask @Inject constructor(
LocalData.lastTimeDiagnosisKeysFromServerFetch(currentDate) LocalData.lastTimeDiagnosisKeysFromServerFetch(currentDate)
} }
private fun noKeysFetchedToday(): Boolean {
val currentDate = DateTime(timeStamper.nowUTC, DateTimeZone.UTC)
val lastFetch = DateTime(
LocalData.lastTimeDiagnosisKeysFromServerFetch(),
DateTimeZone.UTC
)
return (LocalData.lastTimeDiagnosisKeysFromServerFetch() == null ||
currentDate.withTimeAtStartOfDay() != lastFetch.withTimeAtStartOfDay()).also {
if (it) {
Timber.tag(TAG)
.d("No keys fetched today yet (last=%s, now=%s)", lastFetch, currentDate)
BackgroundWorkHelper.sendDebugNotification(
"Start Task",
"No keys fetched today yet \n${DateTime.now()}\nUTC: $currentDate"
)
}
}
}
private fun rollback(rollbackItems: MutableList<RollbackItem>) { private fun rollback(rollbackItems: MutableList<RollbackItem>) {
try { try {
Timber.tag(TAG).d("Initiate Rollback") Timber.tag(TAG).d("Initiate Rollback")
......
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