chore: can links be empty ?
All checks were successful
Check PR code / Lint (pull_request) Successful in 1m3s
Check PR code / build (pull_request) Successful in 11m14s

This commit is contained in:
2024-12-30 22:45:18 +01:00
parent 61b9fd30e0
commit fb9ceecabd
2 changed files with 27 additions and 5 deletions

View File

@ -52,6 +52,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.acra.ktx.sendSilentlyWithAcra
import org.kodein.di.DI
import org.kodein.di.DIAware
import org.kodein.di.android.x.closestDI
@ -103,7 +104,12 @@ class ArticleFragment : Fragment(), DIAware {
try {
binding = FragmentArticleBinding.inflate(inflater, container, false)
url = item.getLinkDecoded()
try {
url = item.getLinkDecoded()
} catch (e: Exception) {
e.sendSilentlyWithAcra()
}
contentText = item.content
contentTitle = item.title.getHtmlDecoded()
contentImage = item.getThumbnail(repository.baseUrl)