fix(infrared): url-encode profileId in routes and cancel underlying learning deferred
This commit is contained in:
@@ -100,9 +100,10 @@ private fun AuthenticatedNavHost(
|
||||
actionInProgress = actionInProgress,
|
||||
errorMessage = errorMessage,
|
||||
devicesSlot = {
|
||||
val encodedProfileId = android.net.Uri.encode(profile.id.value)
|
||||
DeviceListScreen(
|
||||
onInfraredClick = {
|
||||
navController.navigate("infrared_remote/${profile.id.value}")
|
||||
navController.navigate("infrared_remote/$encodedProfileId")
|
||||
},
|
||||
)
|
||||
},
|
||||
@@ -114,10 +115,11 @@ private fun AuthenticatedNavHost(
|
||||
navArgument("profileId") { type = NavType.StringType },
|
||||
),
|
||||
) {
|
||||
val encodedProfileId = android.net.Uri.encode(profile.id.value)
|
||||
InfraredRemoteRoute(
|
||||
onBack = { navController.popBackStack() },
|
||||
onOpenSettings = {
|
||||
navController.navigate("infrared_settings/${profile.id.value}")
|
||||
navController.navigate("infrared_settings/$encodedProfileId")
|
||||
},
|
||||
onSessionInvalid = onLogout,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user