mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-04 03:37:21 +00:00
fix(roaming): live coords from shared flow, marker by locator pair, versioned apk
Addresses three review findings: 1. Coordinates now come straight from settingsRepo.stationPosition in the screen (collectAsStateWithLifecycle) — the exact same StateFlow the Settings page shows. Previously a separate ViewModel re-derived them, and it could lag behind the Settings page (user: '设置页更新了站位但漫游页死活不更新'). With the shared source the two pages can never disagree. RoamingViewModel removed; state derivation moved to RoamingState.fromPosition(). 2. Red marker placement ported faithfully from the QTH定位器 app: it is driven by the 3rd character pair of the 8-char locator (the 'ih' in OL42ih45), mapped to a 0..1 fraction (lon a=west..x=east, lat inverted a=south..x=north), then scaled to the actual center-cell size. The grid now uses the reference proportions (columns 21.4/56.2/21.4, rows 31.5/35.9/31.7) and fills the screen, so the marker lands accurately on any device. 3. Workflow now uploads a versioned APK (look4sat-<version>.apk instead of look4sat.apk). Also: Settings 'Other' card rows got vertical spacing (Arrangement.spacedBy) so the new roaming toggle is not glued to the night-mode row.
This commit is contained in:
1 parent
bff3e1af09
commit
f9250ec1f1
6 files changed
+154
-182
No files matched your search
@@ -86,7 +86,6 @@ import com.rtbishop.look4sat.feature.mutual.MutualViewModel
|
||||
import com.rtbishop.look4sat.feature.passes.PassesDestination
|
||||
import com.rtbishop.look4sat.feature.radar.RadarDestination
|
||||
import com.rtbishop.look4sat.feature.roaming.RoamingScreen
|
||||
import com.rtbishop.look4sat.feature.roaming.RoamingViewModel
|
||||
import com.rtbishop.look4sat.feature.satellites.SatellitesDestination
|
||||
import com.rtbishop.look4sat.feature.settings.SettingsDestination
|
||||
|
||||
@@ -227,11 +226,7 @@ fun MainScreen(navigateToRadar: () -> Unit = {}) {
|
||||
)
|
||||
}
|
||||
entry<Screen.Roaming> {
|
||||
val roamingViewModel: RoamingViewModel = viewModel(
|
||||
viewModelStoreOwner = context as ViewModelStoreOwner,
|
||||
factory = RoamingViewModel.factory(container)
|
||||
)
|
||||
RoamingScreen(viewModel = roamingViewModel)
|
||||
RoamingScreen()
|
||||
}
|
||||
entry<Screen.Settings> {
|
||||
SettingsDestination()
|
||||
|
||||
Reference in new issue
Block a user