private fun reloadWebViewOnClick(){
//webview reload
lifecycleScope.launchWhenResumed {
launch(Dispatchers.Main) {
binding?.webview?.reload()
}
}
}
I have tried log but controle never enter at reload scope. I am unable find what I am missing.
Please change launchWhenResumed to launch because launch will work only when the fragment resumes.
private fun reloadWebViewOnClick(){
//webview reload
lifecycleScope.launch {
launch(Dispatchers.Main) {
binding?.webview?.reload()
}
}
}