Just to be sure.

This commit is contained in:
aminecmi 2019-01-14 19:39:54 +01:00
parent 592fb6328a
commit 69da932ab5

View File

@ -127,10 +127,12 @@ class ArticleFragment : Fragment() {
font = prefs.getString("reader_font", "") font = prefs.getString("reader_font", "")
if (font.isNotEmpty()) { if (font.isNotEmpty()) {
resId = context!!.resources.getIdentifier(font, "font", context!!.packageName) resId = context!!.resources.getIdentifier(font, "font", context!!.packageName)
try { typeface = try {
typeface = ResourcesCompat.getFont(context!!, resId)!! ResourcesCompat.getFont(context!!, resId)!!
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!) ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!)
// Just to be sure
null
} }
} }