From 2b4bc5ef32393e37a87877bcf5ff1134c84d65e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 Mar 2012 09:31:16 +0300 Subject: [PATCH] support non-image attachments (closes #434) bump version --- AndroidManifest.xml | 4 ++-- src/org/fox/ttrss/ArticleFragment.java | 6 ++++-- src/org/fox/ttrss/HeadlinesFragment.java | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 76d65f8b..c0c2cb88 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="68" + android:versionName="0.5.4" > diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index 79af1204..6941cfca 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -167,14 +167,16 @@ public class ArticleFragment extends Fragment { String attachments = "
" + getString(R.string.attachments) + " "; for (Attachment a : m_article.attachments) { - if (a.content_type != null && a.content_url != null && a.content_type.indexOf("image") != -1) { + if (a.content_type != null && a.content_url != null) { try { URL url = new URL(a.content_url.trim()); String atitle = (a.title != null && a.title.length() > 0) ? a.title : new File(url.getFile()).getName(); - content += "
"; + if (a.content_type.indexOf("image") != -1) { + content += "
"; + } attachments += "" + atitle + ", "; diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 4cdf4a18..e0927790 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -448,14 +448,16 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, String attachments = "
" + getString(R.string.attachments) + " "; for (Attachment a : article.attachments) { - if (a.content_type != null && a.content_url != null && a.content_type.indexOf("image") != -1) { + if (a.content_type != null && a.content_url != null) { try { URL url = new URL(a.content_url.trim()); String atitle = (a.title != null && a.title.length() > 0) ? a.title : new File(url.getFile()).getName(); - articleContent += "
"; + if (a.content_type.indexOf("image") != -1) { + articleContent += "
"; + } attachments += "" + atitle + ", ";