From f9accdd5176a2069922ab1ef8bc57881750412c6 Mon Sep 17 00:00:00 2001 From: atsunatsu Date: Sun, 9 Aug 2026 01:03:30 +0800 Subject: [PATCH] feat: add AMSAT status page to bottom navigation bar - Add ic_satellite_alt.xml icon (from upstream author rt-bishop) - Add Screen.AMSAT to Navigation.kt - Add AMSAT entry in MainScreen.kt nav bar + NavDisplay entry - Wire up feature:status module dependency in ApplicationPlugin - Chinese/English nav_amsat strings already exist from earlier port --- .../java/com/rtbishop/look4sat/MainScreen.kt | 7 ++++++- .../look4sat/convention/ApplicationPlugin.kt | 1 + .../look4sat/core/presentation/Navigation.kt | 3 +++ .../main/res/drawable/ic_satellite_alt.xml | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 core/presentation/src/main/res/drawable/ic_satellite_alt.xml diff --git a/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt b/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt index c549f558..e3a126af 100644 --- a/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt +++ b/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt @@ -87,6 +87,7 @@ import com.rtbishop.look4sat.feature.passes.PassesDestination import com.rtbishop.look4sat.feature.radar.RadarDestination import com.rtbishop.look4sat.feature.satellites.SatellitesDestination import com.rtbishop.look4sat.feature.settings.SettingsDestination +import com.rtbishop.look4sat.feature.status.SatStatusScreen @Composable fun NavRoot(deeplink: String? = null) { @@ -130,7 +131,7 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { val currentKey = backStack.lastOrNull() val navigateBack: () -> Unit = { backStack.removeLastOrNull() } val fadeTransition = fadeIn(animationSpec = tween(350)) togetherWith fadeOut(animationSpec = tween(350)) - val navItems = listOf(Screen.Satellites, Screen.Passes, Screen.Radar, Screen.Mutual, Screen.Map, Screen.Settings) + val navItems = listOf(Screen.Satellites, Screen.Passes, Screen.Radar, Screen.Mutual, Screen.Map, Screen.AMSAT, Screen.Settings) val context = LocalContext.current val container = (context.applicationContext as IContainerProvider).getMainContainer() @@ -157,6 +158,7 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { is Screen.Radar -> screen is Screen.Radar is Screen.Mutual -> screen is Screen.Mutual is Screen.Map -> screen is Screen.Map + is Screen.AMSAT -> screen is Screen.AMSAT is Screen.Settings -> screen is Screen.Settings else -> false } @@ -224,6 +226,9 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { } ) } + entry { + SatStatusScreen(container = container) + } entry { SettingsDestination() } diff --git a/build-logic/convention/src/main/java/com/rtbishop/look4sat/convention/ApplicationPlugin.kt b/build-logic/convention/src/main/java/com/rtbishop/look4sat/convention/ApplicationPlugin.kt index db09bc5f..0a26f7ee 100644 --- a/build-logic/convention/src/main/java/com/rtbishop/look4sat/convention/ApplicationPlugin.kt +++ b/build-logic/convention/src/main/java/com/rtbishop/look4sat/convention/ApplicationPlugin.kt @@ -37,6 +37,7 @@ internal class ApplicationPlugin : Plugin { implementation(project(":feature:radar")) implementation(project(":feature:satellites")) implementation(project(":feature:settings")) + implementation(project(":feature:status")) implementation(libs.androidx.core.splashscreen) implementation(libs.compose.material3.adaptive) implementation(libs.compose.navigation3) diff --git a/core/presentation/src/main/java/com/rtbishop/look4sat/core/presentation/Navigation.kt b/core/presentation/src/main/java/com/rtbishop/look4sat/core/presentation/Navigation.kt index 3c7672df..b6ea6741 100644 --- a/core/presentation/src/main/java/com/rtbishop/look4sat/core/presentation/Navigation.kt +++ b/core/presentation/src/main/java/com/rtbishop/look4sat/core/presentation/Navigation.kt @@ -38,6 +38,9 @@ sealed class Screen(val iconResId: Int, val titleResId: Int) : NavKey { @Serializable data object Mutual : Screen(R.drawable.ic_match, R.string.nav_mutual) + @Serializable + data object AMSAT : Screen(R.drawable.ic_satellite_alt, R.string.nav_amsat) + @Serializable data object Settings : Screen(R.drawable.ic_settings, R.string.nav_prefs) } diff --git a/core/presentation/src/main/res/drawable/ic_satellite_alt.xml b/core/presentation/src/main/res/drawable/ic_satellite_alt.xml new file mode 100644 index 00000000..3c226bdf --- /dev/null +++ b/core/presentation/src/main/res/drawable/ic_satellite_alt.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + \ No newline at end of file