diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index beff9a1f..bf89e324 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -335,6 +335,20 @@ public class ArticleFragment extends StateSavedFragment { } } + TextView host = view.findViewById(R.id.host); + if (host != null) { + try { + URL inurl = new URL(m_article.comments_link); /* This could be improved if /tt-rss/api:getArticle returned feed_url */ + URL outurl = new URL(m_article.link); + String inhost = inurl.getHost(); + String outhost = outurl.getHost(); + if (!inhost.equals(outhost)) { + host.setVisibility(View.VISIBLE); + host.setText(outhost.replaceFirst("^www\\.", "")); + } + } catch (MalformedURLException ignored) {} + } + TextView note = view.findViewById(R.id.note); if (note != null) { |