mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Various fixes to PassesFragment's ui state handling
This commit is contained in:
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() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user