Compare commits

...

11 Commits

Author SHA1 Message Date
c2a1c9eaac fix: requirecontext issues ?
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-02-26 16:05:26 +01:00
bf37209a15 debug: activity not found exception. 2023-02-26 15:40:58 +01:00
2c558fe6fd Changelog for v123020571 [CI SKIP] 2023-02-26 07:49:16 +00:00
ad88011454 chore: remove errors logging.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-02-25 22:57:59 +01:00
559c17bc1d fix: quickfix for url param not provided for some sources. 2023-02-25 22:46:04 +01:00
ab9c46f0eb Update 'CHANGELOG.md'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-21 15:00:37 +00:00
aa799d2ca8 Changelog for v123020523 [CI SKIP] 2023-02-21 14:49:14 +00:00
177c978474 fix: Git changelog.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-02-21 14:05:32 +00:00
39b9991413 Changelog for v123020522 [CI SKIP] 2023-02-21 13:25:11 +00:00
b303f110f1 fix: still fixing changelog versions.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-02-21 12:59:38 +00:00
f851941a6a Changelog for v123020521 [CI SKIP] 2023-02-21 11:31:18 +00:00
5 changed files with 123 additions and 97 deletions

View File

@ -48,10 +48,11 @@ steps:
commands: commands:
- apt-get update && apt-get install -y git - apt-get update && apt-get install -y git
- git fetch --tags -p - git fetch --tags -p
- PREV=$(git describe --tags --abbrev=0)
- ./build.sh --publish --from-ci - ./build.sh --publish --from-ci
- git remote add pushing https://$GITEA_USR:$GITEA_PASS@gitea.amine-louveau.fr/Louvorg/ReaderForSelfoss-multiplatform.git - git remote add pushing https://$GITEA_USR:$GITEA_PASS@gitea.amine-louveau.fr/Louvorg/ReaderForSelfoss-multiplatform.git
- VER=$(git describe --tags --abbrev=0) - VER=$(git describe --tags --abbrev=0)
- CHANGELOG=$(git log $VER..HEAD --pretty="- %s") - CHANGELOG=$(git log $PREV..HEAD --pretty="- %s")
- echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md - echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
- git add CHANGELOG.md - git add CHANGELOG.md
- git commit -m "Changelog for $VER [CI SKIP]" - git commit -m "Changelog for $VER [CI SKIP]"

View File

@ -1,3 +1,18 @@
**v123020571**
- chore: remove errors logging.
- fix: quickfix for url param not provided for some sources.
- Update 'CHANGELOG.md'
- Changelog for v123020523 [CI SKIP]
--------------------------------------------------------------------
**v123020523**
- fix: Git changelog.
--------------------------------------------------------------------
**v123020491** **v123020491**
- fix: Fixed acra bug reporting. - fix: Fixed acra bug reporting.

View File

@ -1,5 +1,6 @@
package bou.amine.apps.readerforselfossv2.android.fragments package bou.amine.apps.readerforselfossv2.android.fragments
import android.content.ActivityNotFoundException
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.content.res.TypedArray import android.content.res.TypedArray
@ -150,6 +151,7 @@ class ArticleFragment : Fragment(), DIAware {
} catch (e: InflateException) { } catch (e: InflateException) {
e.sendSilentlyWithAcraWithName("webview not available") e.sendSilentlyWithAcraWithName("webview not available")
if (context != null) {
AlertDialog.Builder(requireContext()) AlertDialog.Builder(requireContext())
.setMessage(requireContext().getString(R.string.webview_dialog_issue_message)) .setMessage(requireContext().getString(R.string.webview_dialog_issue_message))
.setTitle(requireContext().getString(R.string.webview_dialog_issue_title)) .setTitle(requireContext().getString(R.string.webview_dialog_issue_title))
@ -162,6 +164,7 @@ class ArticleFragment : Fragment(), DIAware {
.create() .create()
.show() .show()
} }
}
return binding.root return binding.root
} }
@ -304,10 +307,16 @@ class ArticleFragment : Fragment(), DIAware {
binding.webcontent.webViewClient = object : WebViewClient() { binding.webcontent.webViewClient = object : WebViewClient() {
@Deprecated("Deprecated in Java") @Deprecated("Deprecated in Java")
override fun shouldOverrideUrlLoading(view: WebView?, url: String): Boolean { override fun shouldOverrideUrlLoading(view: WebView?, url: String): Boolean {
if (binding.webcontent.hitTestResult.type != WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) { return if (context != null && binding.webcontent.hitTestResult.type != WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
try {
requireContext().startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 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") @Deprecated("Deprecated in Java")
@ -325,7 +334,7 @@ class ArticleFragment : Fragment(), DIAware {
getBitmapInputStream(image, Bitmap.CompressFormat.JPEG) getBitmapInputStream(image, Bitmap.CompressFormat.JPEG)
) )
} catch (e: ExecutionException) { } catch (e: ExecutionException) {
e.sendSilentlyWithAcraWithName("shouldInterceptRequest > jpeg > $url") // Do nothing
} }
} else if (url.lowercase(Locale.US).contains(".png")) { } else if (url.lowercase(Locale.US).contains(".png")) {
try { try {
@ -337,7 +346,7 @@ class ArticleFragment : Fragment(), DIAware {
getBitmapInputStream(image, Bitmap.CompressFormat.PNG) getBitmapInputStream(image, Bitmap.CompressFormat.PNG)
) )
} catch (e: ExecutionException) { } catch (e: ExecutionException) {
e.sendSilentlyWithAcraWithName("shouldInterceptRequest > png > $url") // Do nothing
} }
} else if (url.lowercase(Locale.US).contains(".webp")) { } else if (url.lowercase(Locale.US).contains(".webp")) {
try { try {
@ -349,7 +358,7 @@ class ArticleFragment : Fragment(), DIAware {
getBitmapInputStream(image, Bitmap.CompressFormat.WEBP) getBitmapInputStream(image, Bitmap.CompressFormat.WEBP)
) )
} catch (e: ExecutionException) { } catch (e: ExecutionException) {
e.sendSilentlyWithAcraWithName("shouldInterceptRequest > webp > $url") // Do nothing
} }
} }
@ -359,7 +368,7 @@ class ArticleFragment : Fragment(), DIAware {
} }
private fun htmlToWebview() { private fun htmlToWebview() {
if (context != null) {
val attrs: IntArray = intArrayOf(android.R.attr.fontFamily) val attrs: IntArray = intArrayOf(android.R.attr.fontFamily)
val a: TypedArray = requireContext().obtainStyledAttributes(resId, attrs) val a: TypedArray = requireContext().obtainStyledAttributes(resId, attrs)
@ -500,6 +509,7 @@ class ArticleFragment : Fragment(), DIAware {
null null
) )
} }
}
fun scrollDown() { fun scrollDown() {
val height = binding.nestedScrollView.measuredHeight val height = binding.nestedScrollView.measuredHeight

View File

@ -76,7 +76,7 @@ class SelfossModel {
) )
@Serializable @Serializable
data class SourceParams( data class SourceParams(
val url: String val url: String?
) )
@Serializable @Serializable
data class Item( data class Item(

View File

@ -20,7 +20,7 @@ fun SOURCE.toView(): SelfossModel.Source =
this.spout, this.spout,
this.error, this.error,
this.icon, this.icon,
if (this.url != null) SelfossModel.SourceParams(this.url) else null SelfossModel.SourceParams(this.url)
) )
fun SelfossModel.Source.toEntity(): SOURCE = fun SelfossModel.Source.toEntity(): SOURCE =