Various fixes to PassesFragment's ui state handling

This commit is contained in:
Arty Bishop committed 2022-02-21 17:27:53 +00:00
1 parent 9fd0d5f2e2
commit 00549bbcba
4 files changed
+55 -42

No files matched your search

@@ -62,8 +62,7 @@ class Predictor(private val predictorDispatcher: CoroutineDispatcher) {
suspend fun processPasses(passList: List<SatPass>, time: Long): List<SatPass> {
return withContext(predictorDispatcher) {
val copiedList = passList.map { it.copy() }
copiedList.forEach { pass ->
passList.forEach { pass ->
if (!pass.isDeepSpace) {
val timeStart = pass.aosTime
if (time > timeStart) {
@@ -73,7 +72,7 @@ class Predictor(private val predictorDispatcher: CoroutineDispatcher) {
}
}
}
copiedList.filter { it.progress < 100 }.map { it.copy() }
passList.filter { pass -> pass.progress < 100 }.map { it.copy() }
}
}