diff --git a/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt b/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt index c9af6d1a..7fbfcc64 100644 --- a/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt +++ b/app/src/main/java/com/rtbishop/look4sat/MainScreen.kt @@ -149,10 +149,14 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { val trackingState by container.radioTrackingService.state.collectAsStateWithLifecycle() val otherSettings by container.settingsRepo.otherSettings.collectAsStateWithLifecycle() // UI settings: sort by screenOrder (empty = default order), then filter by hiddenScreens (Settings always kept) + + val screenOrder = if (otherSettings.screenOrder.isEmpty()) emptyList() + else otherSettings.screenOrder.filter { it != "Radar" } + .let { list -> if ("AMSAT" in list) list else list + "AMSAT" } val allNavItems = listOf(Screen.Satellites, Screen.Passes, Screen.Radar, Screen.Mutual, Screen.Roaming, Screen.CwDecode, Screen.WavelogLog, Screen.AmSat, Screen.Map, Screen.Settings) .sortedBy { screen -> // Unknown pages (e.g. CwDecode not in old persisted order): use default-order position (Roaming<->Map), then fall back to last - val idx = otherSettings.screenOrder.indexOf(screen.screenId) + val idx = screenOrder.indexOf(screen.screenId) if (idx != -1) idx else com.rtbishop.look4sat.core.presentation.defaultScreenOrder.indexOf(screen.screenId).let { if (it != -1) it else Int.MAX_VALUE @@ -160,10 +164,12 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { } .filter { it.screenId !in otherSettings.hiddenScreens || it is Screen.Settings } // 4.5.1 foldable menu: main menu (5 bottom-bar slots) + More menu (overflow page) + // 4.5.6 migration: Radar moved to the More menu, AMSAT promoted to the main menu // Legacy migration: persisted subMenuOrder lacks new pages (WavelogLog) -> append to the sub-menu tail val subOrder = (otherSettings.subMenuOrder.ifEmpty { com.rtbishop.look4sat.core.presentation.defaultSubMenuOrder }) + .filter { it != "AMSAT" } .let { list -> if ("WavelogLog" in list) list else list + "WavelogLog" } - .let { list -> if ("AMSAT" in list) list else list + "AMSAT" } + .let { list -> if ("Radar" in list) list else list + "Radar" } val mainNavItems = remember(allNavItems, subOrder) { allNavItems.filter { it.screenId !in subOrder }.take(5) } @@ -231,8 +237,8 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) { navigationRailContainerColor = MaterialTheme.colorScheme.surfaceContainer ), layoutType = when { - !hasEnoughHeight() && hasEnoughWidth() -> NavigationSuiteType.NavigationRail - !hasEnoughWidth() -> NavigationSuiteType.ShortNavigationBarCompact + hasEnoughWidth() -> NavigationSuiteType.NavigationRail + !hasEnoughHeight() -> NavigationSuiteType.ShortNavigationBarCompact else -> NavigationSuiteType.ShortNavigationBarMedium } ) { 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 a722be18..2bcd4150 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 @@ -48,17 +48,17 @@ sealed class Screen(val iconResId: Int, val titleResId: Int, val screenId: Strin data object WavelogLog : Screen(R.drawable.ic_log, R.string.nav_log, "WavelogLog") @Serializable - data object AmSat : Screen(R.drawable.ic_satellites, R.string.nav_amsat, "AMSAT") + data object AmSat : Screen(R.drawable.ic_satellite_alt, R.string.nav_amsat, "AMSAT") @Serializable data object Settings : Screen(R.drawable.ic_settings, R.string.nav_prefs, "Settings") } // UI settings: default main-menu page order (5 bottom-bar slots) -val defaultScreenOrder = listOf("Satellites", "Passes", "Radar", "Map", "Settings") +val defaultScreenOrder = listOf("Satellites", "Passes", "AMSAT", "Map", "Settings") // UI settings: default More-menu order (pages behind "More") -val defaultSubMenuOrder = listOf("Mutual", "Roaming", "CwDecode", "WavelogLog", "AMSAT") +val defaultSubMenuOrder = listOf("Mutual", "Radar", "Roaming", "CwDecode", "WavelogLog") @Serializable data object RadarDestination : NavKey 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..524b11e1 --- /dev/null +++ b/core/presentation/src/main/res/drawable/ic_satellite_alt.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/core/presentation/src/main/res/values-id/strings.xml b/core/presentation/src/main/res/values-id/strings.xml index e7a1ef22..01ebc38a 100644 --- a/core/presentation/src/main/res/values-id/strings.xml +++ b/core/presentation/src/main/res/values-id/strings.xml @@ -93,11 +93,9 @@ \n\nPerbarui database setidaknya seminggu sekali untuk prediksi yang akurat. Apa yang baru di Look4Sat - * BARU: Status satelit AMSAT kini menggunakan API resmi AMSAT (v1 JSON, lebih cepat dan andal) - * Halaman status AMSAT kini mendukung layar penuh (tombol refresh dan waktu selalu dapat diakses) - * WaveLog: pencarian grid lawan QRZ (dialog ⚙ tempel Cookie + uji query) - * WaveLog: tombol perbarui daftar satelit LoTW (112 satelit bawaan) - * WaveLog: laporan sinyal RST 59/59 untuk QSO (v1 dan v2) + * Navigasi: AMSAT dipindahkan ke bilah bawah, Radar dipindahkan ke menu Lainnya (maks 5 tujuan utama) + * Layar lebar / tablet: rel navigasi samping, bukan bilah bawah (strip kosong bawah dihilangkan) + * Ikon tab AMSAT baru (MDI satellite-variant, Apache 2.0) Kembali Beri tahu diff --git a/core/presentation/src/main/res/values-in/strings.xml b/core/presentation/src/main/res/values-in/strings.xml index f5dc4c16..97d31c92 100644 --- a/core/presentation/src/main/res/values-in/strings.xml +++ b/core/presentation/src/main/res/values-in/strings.xml @@ -92,11 +92,9 @@ \n\nPerbarui database setidaknya seminggu sekali untuk prediksi yang akurat. Apa yang baru di Look4Sat - * BARU: Status satelit AMSAT kini menggunakan API resmi AMSAT (v1 JSON, lebih cepat dan andal) - * Halaman status AMSAT kini mendukung layar penuh (tombol refresh dan waktu selalu dapat diakses) - * WaveLog: pencarian grid lawan QRZ (dialog ⚙ tempel Cookie + uji query) - * WaveLog: tombol perbarui daftar satelit LoTW (112 satelit bawaan) - * WaveLog: laporan sinyal RST 59/59 untuk QSO (v1 dan v2) + * Navigasi: AMSAT dipindahkan ke bilah bawah, Radar dipindahkan ke menu Lainnya (maks 5 tujuan utama) + * Layar lebar / tablet: rel navigasi samping, bukan bilah bawah (strip kosong bawah dihilangkan) + * Ikon tab AMSAT baru (MDI satellite-variant, Apache 2.0) Kembali Beri tahu diff --git a/core/presentation/src/main/res/values-tr/strings.xml b/core/presentation/src/main/res/values-tr/strings.xml index 1140df02..869c7cd5 100644 --- a/core/presentation/src/main/res/values-tr/strings.xml +++ b/core/presentation/src/main/res/values-tr/strings.xml @@ -97,11 +97,9 @@ \n\nDoğru tahminler alabilmek için veritabanını en az haftada bir güncelleyin. What\'s new in Look4Sat - * YENİ: AMSAT uydu durumu resmi AMSAT API kullanıyor (v1 JSON, daha hızlı ve güvenilir) - * AMSAT durum sayfası tam ekran cihazlara uyumlu (yenileme düğmesi ve saat her zaman erişilebilir) - * WaveLog: QRZ karşı grid sorgulama (⚙ diyalogda Cookie yapıştır + test sorgusu) - * WaveLog: LoTW uydu listesi güncelleme düğmesi (112 uydu yerleşik) - * WaveLog: RST 59/59 sinyal raporu (v1 ve v2) + * Gezinme: AMSAT alt çubuğa taşındı, Radar Daha Fazla menüsüne taşındı (en fazla 5 ana hedef) + * Geniş ekran / tablet: alt çubuk yerine yan gezinme rayı (alttaki boş şerit kaldırıldı) + * Yeni AMSAT sekme simgesi (MDI satellite-variant, Apache 2.0) diff --git a/core/presentation/src/main/res/values-zh/strings.xml b/core/presentation/src/main/res/values-zh/strings.xml index 82d4b412..12e2b44d 100644 --- a/core/presentation/src/main/res/values-zh/strings.xml +++ b/core/presentation/src/main/res/values-zh/strings.xml @@ -87,11 +87,9 @@ 请务必在设置中通过GPS、经纬度或QTH定位您的位置\n建议至少每周更新一次数据库,以确保预测结果的准确性 Look4Sat Pro 更新内容 - * 新: AMSAT 卫星状态改用官方 AMSAT API(v1 JSON,更快更稳) - * AMSAT 状态页适配全面屏(刷新按钮和更新时间始终可点) - * WaveLog: QRZ 对方网格查询(⚙ 弹窗粘贴 Cookie + 测试查询) - * WaveLog: LoTW 卫星列表更新按钮(内置 112 颗卫星) - * WaveLog: 信号报告 59/59(v1 和 v2) + * 导航: AMSAT 移到底部栏,雷达移到更多菜单(主目的地最多 5 个) + * 宽屏/平板: 改为侧边导航栏(不再有底部空白条) + * AMSAT 标签新图标(MDI satellite-variant,Apache 2.0) diff --git a/core/presentation/src/main/res/values/strings.xml b/core/presentation/src/main/res/values/strings.xml index 75fdb622..ee41e1bf 100644 --- a/core/presentation/src/main/res/values/strings.xml +++ b/core/presentation/src/main/res/values/strings.xml @@ -99,11 +99,9 @@ \n\nPlease update the database at least weekly to get accurate predictions. What\'s new in Look4Sat - * NEW: AMSAT satellite status now uses the official AMSAT API (v1 JSON, faster and more reliable) - * AMSAT status page fits edge-to-edge screens (refresh button and update time always reachable) - * WaveLog: QRZ counterpart grid lookup (gear dialog > paste QRZ cookies > test query) - * WaveLog: LoTW satellite list refresh button (112 satellites built in) - * WaveLog: RST 59/59 signal reports for QSOs (v1 and v2) + * Navigation: AMSAT moved to the bottom bar, Radar moved to the More menu (5 primary destinations max) + * Wide screens / tablets: side navigation rail instead of the bottom bar (no more wasted bottom strip) + * New AMSAT tab icon (MDI satellite-variant, Apache 2.0) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 32890d54..cc256dba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] #noinspection UnusedVersionCatalogEntry -appVersionCode = "456" +appVersionCode = "457" #noinspection UnusedVersionCatalogEntry -appVersionName = "4.5.5" +appVersionName = "4.5.6" #noinspection UnusedVersionCatalogEntry compileSdk = "37" #noinspection UnusedVersionCatalogEntry