From 7d1ccb7d80c68ef8a23ace186d3fdb497f46865c Mon Sep 17 00:00:00 2001 From: StarMusa88 <142222631+StarMusa88@users.noreply.github.com> Date: Fri, 13 Nov 2026 21:44:35 -0500 Subject: [PATCH] Show the restarted test instead of leaving the result on top "Test again" used the tab-switch helper, whose popUpTo(saveState) + restoreState immediately restored the result screen on top of the speedtest screen, so the test ran hidden behind the result and only appeared after pressing Back. Pop the result off the stack instead. --- .../app/src/main/java/org/librespeed/speedtest/ui/App.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Speedtest-Android/app/src/main/java/org/librespeed/speedtest/ui/App.kt b/Speedtest-Android/app/src/main/java/org/librespeed/speedtest/ui/App.kt index 738a41a..05f9cdc 100644 --- a/Speedtest-Android/app/src/main/java/org/librespeed/speedtest/ui/App.kt +++ b/Speedtest-Android/app/src/main/java/org/librespeed/speedtest/ui/App.kt @@ -141,7 +141,10 @@ fun App(windowWidth: WindowWidthSizeClass = WindowWidthSizeClass.Compact, hinge: entryId = entry.arguments?.getLong("id") ?: 0L, onBack = { navController.popBackStack() }, onTestAgain = { serverName -> - navController.navigateTo(Destination.SPEEDTEST) + //pop the result off the stack instead of using the tab helper: + //its saveState/restoreState would put this result screen back on + //top of the speedtest screen, hiding the test it just started + navController.popBackStack(Destination.SPEEDTEST.route, inclusive = false) speedtestViewModel.testAgain(serverName) }, onTestDetails = { id -> navController.navigate("testdetails/$id") },