mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Added consistent pass selection to Radar and Map screens
This commit is contained in:
1 parent
8a2339cfbf
commit
a39b1716e7
13 files changed
+62
-107
No files matched your search
@@ -123,10 +123,7 @@ private val moonIconPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
|
||||
fun MapDestination() {
|
||||
val context = LocalContext.current
|
||||
val container = (context.applicationContext as IContainerProvider).getMainContainer()
|
||||
val viewModel = viewModel(
|
||||
modelClass = MapViewModel::class.java,
|
||||
factory = MapViewModel.factory(container)
|
||||
)
|
||||
val viewModel: MapViewModel = viewModel(factory = MapViewModel.factory(container))
|
||||
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
|
||||
val mapView = rememberMapViewWithLifecycle()
|
||||
MapScreen(uiState, viewModel::onAction, mapView)
|
||||
|
||||
@@ -76,7 +76,8 @@ class MapViewModel(
|
||||
_uiState.update { it.copy(isUtc = settings.stateOfUtc) }
|
||||
}
|
||||
}
|
||||
selectDefaultSatellite(-1)
|
||||
val (selectedCatNum, _) = satelliteRepo.selectedPass.value
|
||||
selectDefaultSatellite(if (selectedCatNum != 0) selectedCatNum else -1)
|
||||
}
|
||||
|
||||
fun onAction(action: MapAction) {
|
||||
|
||||
Reference in new issue
Block a user