mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
fix(nav): map Match prefill pushes Mutual onto the stack
The grid-QSO dialog Match button now adds Mutual on top of the Map entry instead of clearing the stack, so the system back gesture pops back to the map page (the page the user came from). Bottom-nav tab switches keep their replace semantics.
This commit is contained in:
1 parent
3d5b55faa3
commit
4260fbb096
1 file changed
+8
-3
@@ -248,10 +248,15 @@ fun MainScreen(
|
|||||||
mapFilterViewModel = mapFilterViewModel,
|
mapFilterViewModel = mapFilterViewModel,
|
||||||
onMatchGrid = { grid ->
|
onMatchGrid = { grid ->
|
||||||
// Grid-QSO dialog "Match" button: pre-fill the
|
// Grid-QSO dialog "Match" button: pre-fill the
|
||||||
// match page for that grid and switch to its tab.
|
// match page for that grid and open it.
|
||||||
mutualViewModel.prefillMatchFromGrid(grid)
|
mutualViewModel.prefillMatchFromGrid(grid)
|
||||||
while (backStack.size > 1) backStack.removeAt(backStack.size - 1)
|
// Push Mutual on top of the Map entry instead of
|
||||||
backStack.add(Screen.Mutual)
|
// replacing the stack (bottom-nav style): the
|
||||||
|
// system back gesture then pops back to the map
|
||||||
|
// page, which is the page the user came from.
|
||||||
|
if (backStack.lastOrNull() !is Screen.Mutual) {
|
||||||
|
backStack.add(Screen.Mutual)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user