Compare commits

..

No commits in common. "c2a1c9eaac66cf6213d73ea91637a1b6a5140ffe" and "2c558fe6fd372ef7a290872268e31124c0bd4717" have entirely different histories.

View File

@ -1,6 +1,5 @@
package bou.amine.apps.readerforselfossv2.android.fragments
import android.content.ActivityNotFoundException
import android.content.Intent
import android.content.res.ColorStateList
import android.content.res.TypedArray
@ -151,7 +150,6 @@ class ArticleFragment : Fragment(), DIAware {
} catch (e: InflateException) {
e.sendSilentlyWithAcraWithName("webview not available")
if (context != null) {
AlertDialog.Builder(requireContext())
.setMessage(requireContext().getString(R.string.webview_dialog_issue_message))
.setTitle(requireContext().getString(R.string.webview_dialog_issue_title))
@ -164,7 +162,6 @@ class ArticleFragment : Fragment(), DIAware {
.create()
.show()
}
}
return binding.root
}
@ -307,16 +304,10 @@ class ArticleFragment : Fragment(), DIAware {
binding.webcontent.webViewClient = object : WebViewClient() {
@Deprecated("Deprecated in Java")
override fun shouldOverrideUrlLoading(view: WebView?, url: String): Boolean {
return if (context != null && binding.webcontent.hitTestResult.type != WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
try {
if (binding.webcontent.hitTestResult.type != WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
requireContext().startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
} catch (e: ActivityNotFoundException) {
e.sendSilentlyWithAcraWithName("activityNotFound > $url")
}
true
} else {
false
}
return true
}
@Deprecated("Deprecated in Java")
@ -368,7 +359,7 @@ class ArticleFragment : Fragment(), DIAware {
}
private fun htmlToWebview() {
if (context != null) {
val attrs: IntArray = intArrayOf(android.R.attr.fontFamily)
val a: TypedArray = requireContext().obtainStyledAttributes(resId, attrs)
@ -509,7 +500,6 @@ class ArticleFragment : Fragment(), DIAware {
null
)
}
}
fun scrollDown() {
val height = binding.nestedScrollView.measuredHeight