Keeping the source even when fetching details from mercury.

This commit is contained in:
Amine Bou 2018-04-07 19:55:55 +02:00
parent 987513a88b
commit bafd478604

View File

@ -125,11 +125,11 @@ class ArticleFragment : Fragment() {
} }
) )
rootView.source.text = contentSource
if (contentText.isEmptyOrNullOrNullString()) { if (contentText.isEmptyOrNullOrNullString()) {
getContentFromMercury(customTabsIntent, prefs, context) getContentFromMercury(customTabsIntent, prefs, context)
} else { } else {
rootView.source.text = contentSource
rootView.titleView.text = contentTitle rootView.titleView.text = contentTitle
htmlToWebview(contentText, prefs, context) htmlToWebview(contentText, prefs, context)
@ -181,7 +181,6 @@ class ArticleFragment : Fragment() {
try { try {
if (response.body() != null && response.body()!!.content != null && !response.body()!!.content.isNullOrEmpty()) { if (response.body() != null && response.body()!!.content != null && !response.body()!!.content.isNullOrEmpty()) {
try { try {
rootView.source.text = response.body()!!.domain
rootView.titleView.text = response.body()!!.title rootView.titleView.text = response.body()!!.title
url = response.body()!!.url url = response.body()!!.url
} catch (e: Exception) { } catch (e: Exception) {