Cleanup UConfigScreen

This commit is contained in:
tarsin committed 2023-06-06 22:48:55 +08:00
1 parent 38e6b60005
commit 0b19cc71c9
1 file changed
+2 -3
@@ -84,9 +84,8 @@ fun UConfigScreen() {
}
onDispose {
// Put cookies back to okhttp cookie store
val cookieManager = CookieManager.getInstance()
val cookiesString = cookieManager.getCookie(url)
if (!cookiesString.isNullOrEmpty()) {
val cookiesString = CookieManager.getInstance().getCookie(url)
if (cookiesString.isNotBlank()) {
val hostUrl = EhUrl.host.toHttpUrl()
launchIO {
EhCookieStore.deleteCookie(hostUrl, KEY_SETTINGS_PROFILE)