fixes
This commit is contained in:
parent
db2d0cb981
commit
0c00ab350d
2 changed files with 3 additions and 4 deletions
|
|
@ -55,6 +55,7 @@ class WebViewActivity : BaseActivity() {
|
|||
generateBtn = toolbar.findViewById(R.id.generate)
|
||||
webViewCompose = findViewById(R.id.webview_compose)
|
||||
cookieManager = CookieManager.getInstance()
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this@WebViewActivity)
|
||||
|
||||
webViewClient = object : AccompanistWebViewClient() {
|
||||
|
|
@ -62,13 +63,11 @@ class WebViewActivity : BaseActivity() {
|
|||
super.onPageFinished(view, url)
|
||||
kotlin.runCatching {
|
||||
toolbar.title = view?.title ?: ""
|
||||
cookies = CookieManager.getInstance().getCookie(view?.url)
|
||||
cookies = cookieManager.getCookie(view?.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cookieManager = CookieManager.getInstance()
|
||||
|
||||
toolbar.setNavigationOnClickListener {
|
||||
cookieManager.flush()
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ object Extensions {
|
|||
runCatching {
|
||||
val tmp = this.getString(it)
|
||||
if (tmp != "null") {
|
||||
return if (tmp.startsWith("[")) {
|
||||
return if (tmp.startsWith("[") && tmp.endsWith("]")) {
|
||||
Json.decodeFromString<List<String>>(tmp).joinToString(", ")
|
||||
}else{
|
||||
tmp
|
||||
|
|
|
|||
Loading…
Reference in a new issue