https://kotlinlang.org logo
Title
u

user

07/10/2022, 9:11 PM
How to save data on disk before app closed? There is WebView with CustomWebViewClient that update a cookie in StateFlow. I want to save it into preferences DataStore. But the cookie update too frequencies on each redirect url. It seems don't right to call operations with memory storage on disk so often. class CustomWebViewClient() : WebViewClient() { private val cookieManager = CookieManager.getInstance() private val _cookieState = MutableStateFlow("") val cookieState = _cookieState.asStateFlow() override fun...