mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
feat(map): run the Match query before navigating to the mutual page
Tapping the grid-QSO dialog "Match" button now starts the pass query on the map page and only navigates to the match page once it finishes, so the page's first frame already contains the results — the time-range card at the top and the pass curves right below, with no scroll flicker. The dialog button shows a spinner and is disabled while calculating. A uiState collector in MainScreen performs the actual navigation (still a push, so the back gesture returns to the map). Failures/exceptions still navigate so the user is never stuck on the map page.
This commit is contained in:
1 parent
d6bdf5ecb6
commit
0e28231c4a
3 files changed
+58
-17
No files matched your search
+7
@@ -146,6 +146,13 @@ class MutualMatchPrefillScrollTest {
|
||||
// ...and the target grid + 24h range pre-filled.
|
||||
org.junit.Assert.assertEquals("OL62", s.stationBGrid)
|
||||
org.junit.Assert.assertEquals(24, s.hoursAhead)
|
||||
// ...and navigation to the match page is pending until the query done.
|
||||
assertTrue("navigation should be pending", s.pendingNavigation)
|
||||
// The early-return guard means the query finished immediately (no
|
||||
// satellites): the map page must now be free to navigate.
|
||||
org.junit.Assert.assertFalse("query finished -> not calculating", s.isCalculating)
|
||||
vm.consumePendingNavigation()
|
||||
org.junit.Assert.assertFalse("consume clears pending navigation", vm.uiState.value.pendingNavigation)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user