Android 12: Recents URL sharing for webview urls

This commit is contained in:
Jays2Kings 2021-07-20 17:07:33 -04:00
parent 2c3a5de679
commit 7b493fca8f

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.ui.webview
import android.app.assist.AssistContent
import android.content.res.Configuration
import android.graphics.Color
import android.os.Build
@ -11,6 +12,7 @@ import android.webkit.WebChromeClient
import android.webkit.WebView
import android.widget.LinearLayout
import androidx.core.graphics.ColorUtils
import androidx.core.net.toUri
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import eu.kanade.tachiyomi.R
@ -136,6 +138,11 @@ open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
}
}
override fun onProvideAssistContent(outContent: AssistContent?) {
super.onProvideAssistContent(outContent)
binding.webview.url?.let { outContent?.webUri = it.toUri() }
}
private fun refreshPage() {
binding.swipeRefresh.isRefreshing = true
binding.webview.reload()