Navback after settings applied

This commit is contained in:
tarsin committed 2023-06-06 22:34:12 +08:00
1 parent 5fb2ec2fda
commit 35a18ecc0f
1 file changed
+7 -2
@@ -31,7 +31,7 @@ import eu.kanade.tachiyomi.util.lang.launchIO
import okhttp3.Cookie
import okhttp3.HttpUrl.Companion.toHttpUrl
private val applyJs = "javascript:(function(){var apply = document.getElementById(\"apply\").children[0];apply.click();})();"
private const val applyJs = "javascript:(function(){var apply = document.getElementById(\"apply\").children[0];apply.click();})();"
@SuppressLint("SetJavaScriptEnabled")
@Composable
@@ -49,7 +49,12 @@ fun UConfigScreen() {
}
},
actions = {
IconButton(onClick = { webview.get()?.loadUrl(applyJs) }) {
IconButton(
onClick = {
webview.get()?.loadUrl(applyJs)
navController.popBackStack()
},
) {
Icon(imageVector = Icons.Default.Check, contentDescription = null)
}
},