Satellite tracker and pass predictor for Android, inspired by Gpredict
Kotlin amsatcelestrakgpsham-radiohamlibhamradiokotlinnasaradiosatellitesatellite-datasatellite-positionsatellite-predictionsatellitessatnogssdrspacespacexstarlink
Updated dependencies and gradle plugin, minor fixes
Arty Bishopd4a2fae0cd5e
diff --git a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsDialog.kt b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsDialog.ktindex 68b9e7ae..1587d11a 100644--- a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsDialog.kt+++ b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsDialog.kt@@ -51,7 +51,6 @@ import androidx.compose.material3.MaterialThemeimport androidx.compose.material3.OutlinedTextFieldimport androidx.compose.material3.Switchimport androidx.compose.material3.Text-import androidx.compose.material3.TextButtonimport androidx.compose.runtime.Composableimport androidx.compose.runtime.LaunchedEffectimport androidx.compose.runtime.MutableFloatState@@ -77,7 +76,6 @@ import androidx.compose.ui.res.stringResourceimport androidx.compose.ui.text.font.FontWeightimport androidx.compose.ui.text.style.TextAlignimport androidx.compose.ui.tooling.preview.Preview-import androidx.compose.ui.unit.IntOffsetimport androidx.compose.ui.unit.dpimport androidx.compose.ui.unit.spimport androidx.compose.ui.zIndex@@ -95,6 +93,7 @@ import com.rtbishop.look4sat.core.presentation.LocalSpacingimport com.rtbishop.look4sat.core.presentation.MainThemeimport com.rtbishop.look4sat.core.presentation.Rimport com.rtbishop.look4sat.core.presentation.ConfirmDialog+import kotlin.time.Duration.Companion.milliseconds@Preview(showBackground = true)@Composable@@ -227,8 +226,8 @@ fun DataSourcesDialog(}}val listState = rememberLazyListState()- val satDraggedId = remember { mutableStateOf(-1L) }- val txDraggedId = remember { mutableStateOf(-1L) }+ val satDraggedId = remember { mutableLongStateOf(-1L) }+ val txDraggedId = remember { mutableLongStateOf(-1L) }val onRestoreDefaults = {nextId.longValue = (Sources.satelliteDataUrls.size + Sources.transceiversDataUrls.size).toLong()satUrls.clear()@@ -241,7 +240,6 @@ fun DataSourcesDialog()satEnabled.clear()txEnabled.clear()- Unit}val onAccept = {val satFiltered = satUrls.filter { it.second.isNotBlank() }@@ -379,10 +377,10 @@ private fun LazyListScope.sourceSection().animateItem(fadeInSpec = spring(),- // The dragged row repositions instantly, while its neighbours spring+ // The dragged row repositions instantly, while its neighbors spring// out of the way (the "squeeze" effect).placementSpec = if (isDragging) {- tween<IntOffset>(durationMillis = 0)+ tween(durationMillis = 0)} else {spring(dampingRatio = Spring.DampingRatioMediumBouncy,@@ -435,7 +433,7 @@ private fun LazyListScope.sourceSection(* Per-row drag state, kept in one object to keep the drag-handle modifier signature small.** [offsetY] is the compensated visual displacement during a drag (finger travel minus the- * heights of already-swapped neighbours), so the row stays glued to the finger. [fingerOffset]+ * heights of already-swapped neighbors), so the row stays glued to the finger. [fingerOffset]* tracks the raw finger travel for edge auto-scroll and swap detection. [settleAnim] smoothly* flies the lifted row back into its slot once the finger is released.*/@@ -448,7 +446,7 @@ private class DragRowState {val isSettling = mutableStateOf(false)}-/** Spring shared by neighbour "squeeze" and the settle-back animation: soft and slightly bouncy. */+/** Spring shared by neighbor "squeeze" and the settle-back animation: soft and slightly bouncy. */private val reorderSpring = spring<Float>(dampingRatio = Spring.DampingRatioMediumBouncy,stiffness = Spring.StiffnessMediumLow@@ -457,9 +455,9 @@ private val reorderSpring = spring<Float>(/*** Drag handle gesture that performs live reordering while dragging.*- * [fingerOffset] tracks the raw finger travel, used for edge auto-scroll and for- * deciding when the dragged row's centre crosses a neighbour's midpoint. [offsetY]- * additionally subtracts the heights of already-swapped neighbours so the visual+ * fingerOffset tracks the raw finger travel, used for edge auto-scroll and for+ * deciding when the dragged row's center crosses a neighbor's midpoint. offsetY+ * additionally subtracts the heights of already-swapped neighbors so the visual* translation (see [draggedVisual]) keeps the row glued to the finger even as the* layout slot moves. Rendering of the whole field is applied on the field itself so* the entire row follows the finger, not just the handle icon.@@ -480,7 +478,7 @@ private fun Modifier.dragHandle(if (myIndex !in urls.indices) returnval myCenter = rowState.startCenterY.floatValue + rowState.fingerOffset.floatValueval visible = listState.layoutInfo.visibleItemsInfo- // Dragging down: swap when the dragged centre passes the next row's midpoint.+ // Dragging down: swap when the dragged center passes the next row's midpoint.if (myIndex < urls.lastIndex) {val next = visible.firstOrNull { it.key == "$sectionKey-${urls[myIndex + 1].first}" }if (next != null && myCenter > next.offset + next.size / 2f) {@@ -489,7 +487,7 @@ private fun Modifier.dragHandle(return}}- // Dragging up: swap when the dragged centre passes the previous row's midpoint.+ // Dragging up: swap when the dragged center passes the previous row's midpoint.if (myIndex > 0) {val prev = visible.firstOrNull { it.key == "$sectionKey-${urls[myIndex - 1].first}" }if (prev != null && myCenter < prev.offset + prev.size / 2f) {@@ -579,9 +577,9 @@ private fun Modifier.draggedVisual(isLifted: Boolean, translationY: Float): Modi/*** Scrolls the list while dragging so the entry follows the finger past the viewport edges.- * The visual centre is tracked independently of the entry's layout slot (which can scroll out- * of [LazyListState.layoutInfo.visibleItemsInfo] during a long drag); [startCenterY] is the- * entry's viewport centre captured at drag start and [fingerOffset] is the raw finger delta.+ * The visual center is tracked independently of the entry's layout slot (which can scroll out+ * of LazyListState.layoutInfo.visibleItemsInfo during a long drag); [startCenterY] is the+ * entry's viewport center captured at drag start and [fingerOffset] is the raw finger delta.*/private suspend fun autoScroll(listState: LazyListState,@@ -602,16 +600,16 @@ private suspend fun autoScroll(else -> 0f}if (delta != 0f) scrollComp.floatValue += listState.scrollBy(delta)- delay(16L)+ delay(16L.milliseconds)}}private fun statusLabel(code: Int): String = if (code == NetworkResult.CONNECTION_ERROR) "ERR" else code.toString()@Composable-private fun statusColor(code: Int): Color = when {- code == NetworkResult.CONNECTION_ERROR -> MaterialTheme.colorScheme.error- code in 200..299 -> Color(0xFF66BB6A)+private fun statusColor(code: Int): Color = when (code) {+ NetworkResult.CONNECTION_ERROR -> MaterialTheme.colorScheme.error+ in 200..299 -> Color(0xFF66BB6A)else -> MaterialTheme.colorScheme.error}diff --git a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsScreen.kt b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsScreen.ktindex f1569bd6..18f86c00 100644--- a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsScreen.kt+++ b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsScreen.kt@@ -188,7 +188,7 @@ private fun SettingsScreen(uiState: SettingsState, onAction: (SettingsAction) ->// URLs for top barval uriHandler = LocalUriHandler.current- val appUrl = stringResource(R.string.prefs_app_url)+// val appUrl = stringResource(R.string.prefs_app_url)val donateUrl = stringResource(R.string.prefs_donate_url)val fdroidTitle = stringResource(R.string.prefs_fdroid_title)val fdroidUrl = stringResource(R.string.prefs_fdroid_url)diff --git a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsViewModel.kt b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsViewModel.ktindex 336f7bc6..351b0e69 100644--- a/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsViewModel.kt+++ b/feature/settings/src/main/java/com/rtbishop/look4sat/feature/settings/SettingsViewModel.kt@@ -206,7 +206,6 @@ class SettingsViewModel(}}-// endregioncompanion object {diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 705d9dea..fa9a8752 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -12,24 +12,24 @@ jdkVersion = "21"#noinspection UnusedVersionCatalogEntrypackageName = "com.rtbishop.look4sat"-android-gradle-plugin = "9.3.1"+android-gradle-plugin = "9.4.0"androidx-core-ktx = "1.19.0"androidx-core-splashscreen = "1.2.0"-androidx-room = "2.8.4"+androidx-room = "2.8.5"-compose-bom = "2026.06.01"+compose-bom = "2026.09.00"compose-activity = "1.13.0"compose-lifecycle = "2.11.0"-compose-navigation3 = "1.1.5"+compose-navigation3 = "1.1.7"-google-ksp = "2.3.10"+google-ksp = "2.3.11"-kotlin = "2.4.10"+kotlin = "2.4.20"kotlin-coroutines = "1.11.0"kotlin-serialization = "1.11.0"-other-okhttp = "5.4.0"+other-okhttp = "5.5.0"other-osmdroid = "6.1.20"test-junit4 = "4.13.2"diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.propertiesindex fb0ce11b..1e1cc32a 100644--- a/gradle/wrapper/gradle-wrapper.properties+++ b/gradle/wrapper/gradle-wrapper.properties@@ -1,7 +1,7 @@-#Tue Aug 11 14:16:53 CEST 2026+#Sat Sep 12 11:29:59 BST 2026distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zipnetworkTimeout=10000validateDistributionUrl=truezipStoreBase=GRADLE_USER_HOME