fix navigating to captcha
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@ import com.meloda.app.fast.common.extensions.updateValue
|
|||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import kotlinx.coroutines.flow.update
|
import kotlinx.coroutines.flow.update
|
||||||
|
import java.net.URLDecoder
|
||||||
|
|
||||||
interface CaptchaViewModel {
|
interface CaptchaViewModel {
|
||||||
val screenState: StateFlow<CaptchaScreenState>
|
val screenState: StateFlow<CaptchaScreenState>
|
||||||
@@ -37,7 +38,7 @@ class CaptchaViewModelImpl(
|
|||||||
screenState.setValue { old ->
|
screenState.setValue { old ->
|
||||||
old.copy(
|
old.copy(
|
||||||
captchaSid = arguments.captchaSid,
|
captchaSid = arguments.captchaSid,
|
||||||
captchaImage = arguments.captchaImage
|
captchaImage = URLDecoder.decode(arguments.captchaImage, "utf-8")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ fun NavGraphBuilder.authNavGraph(
|
|||||||
navController.navigateToCaptcha(
|
navController.navigateToCaptcha(
|
||||||
CaptchaArguments(
|
CaptchaArguments(
|
||||||
arguments.captchaSid,
|
arguments.captchaSid,
|
||||||
arguments.captchaImage
|
URLEncoder.encode(arguments.captchaImage, "utf-8")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user