From 81118dda6feaa5b9949174a48821dcb2eb1dbaf5 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Tue, 9 Oct 2012 13:22:43 +0400
Subject: [PATCH 1/4] bump version
---
AndroidManifest.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a27d9661..18a48b45 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,8 +1,8 @@
+ android:versionCode="110"
+ android:versionName="0.8.9" >
Date: Wed, 10 Oct 2012 14:15:53 +0400
Subject: [PATCH 2/4] fix attachment duplicate checking, bump version
---
AndroidManifest.xml | 4 ++--
src/org/fox/ttrss/ArticleFragment.java | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 18a48b45..39783d68 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,8 +1,8 @@
+ android:versionCode="111"
+ android:versionName="0.8.10" >
";
}
-
- spinnerArray.add(a);
} catch (MalformedURLException e) {
//
} catch (Exception e) {
e.printStackTrace();
}
-
+
+ spinnerArray.add(a);
}
}
From 84bffe92cd1622c9d3b35802106c48890337c0f9 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Wed, 10 Oct 2012 15:12:58 +0400
Subject: [PATCH 3/4] fix status bar not being dimmed after undimmed manually
---
src/org/fox/ttrss/ArticlePager.java | 10 +++++-----
src/org/fox/ttrss/offline/OfflineArticlePager.java | 5 +++++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/org/fox/ttrss/ArticlePager.java b/src/org/fox/ttrss/ArticlePager.java
index bc4e367a..b64d5642 100644
--- a/src/org/fox/ttrss/ArticlePager.java
+++ b/src/org/fox/ttrss/ArticlePager.java
@@ -47,6 +47,11 @@ public class ArticlePager extends Fragment {
if (article != null) {
ArticleFragment af = new ArticleFragment(article);
+
+ if (m_prefs.getBoolean("dim_status_bar", false) && getView() != null) {
+ getView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
+ }
+
return af;
}
return null;
@@ -127,11 +132,6 @@ public class ArticlePager extends Fragment {
}
});
-
- if (m_prefs.getBoolean("dim_status_bar", false)) {
- view.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
- }
-
return view;
}
diff --git a/src/org/fox/ttrss/offline/OfflineArticlePager.java b/src/org/fox/ttrss/offline/OfflineArticlePager.java
index 7e9384ca..bc138bb0 100644
--- a/src/org/fox/ttrss/offline/OfflineArticlePager.java
+++ b/src/org/fox/ttrss/offline/OfflineArticlePager.java
@@ -79,6 +79,11 @@ public class OfflineArticlePager extends Fragment {
Log.d(TAG, "getItem: " + position);
if (m_cursor.moveToPosition(position)) {
+
+ if (m_prefs.getBoolean("dim_status_bar", false) && getView() != null) {
+ getView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
+ }
+
return new OfflineArticleFragment(m_cursor.getInt(m_cursor.getColumnIndex(BaseColumns._ID)));
}
From c444d3b1e6a69665d2750e15b5eea7f423176663 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Wed, 10 Oct 2012 16:45:33 +0400
Subject: [PATCH 4/4] support server always_display_attachments article:
properly serialize new fields
---
src/org/fox/ttrss/ArticleFragment.java | 15 +++++++++------
src/org/fox/ttrss/types/Article.java | 8 ++++++++
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java
index 6da3133a..399f0f10 100644
--- a/src/org/fox/ttrss/ArticleFragment.java
+++ b/src/org/fox/ttrss/ArticleFragment.java
@@ -262,16 +262,19 @@ public class ArticleFragment extends Fragment {
spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+ String flatContent = articleContent.replaceAll("[\r\n]", "");
+ boolean hasImages = flatContent.matches(".*?+].*?");
+
for (Attachment a : m_article.attachments) {
if (a.content_type != null && a.content_url != null) {
try {
- URL url = new URL(a.content_url.trim());
- String strUrl = url.toString().trim();
-
- String regex = String.format(".*?";
}
diff --git a/src/org/fox/ttrss/types/Article.java b/src/org/fox/ttrss/types/Article.java
index 6db4b938..8e619b4b 100644
--- a/src/org/fox/ttrss/types/Article.java
+++ b/src/org/fox/ttrss/types/Article.java
@@ -24,6 +24,7 @@ public class Article implements Parcelable {
public String feed_title;
public int comments_count;
public String comments_link;
+ public boolean always_display_attachments;
public Article(Parcel in) {
readFromParcel(in);
@@ -60,6 +61,9 @@ public class Article implements Parcelable {
out.writeString(content);
out.writeList(attachments);
out.writeString(feed_title);
+ out.writeInt(comments_count);
+ out.writeString(comments_link);
+ out.writeInt(always_display_attachments ? 1 : 0);
}
public void readFromParcel(Parcel in) {
@@ -82,6 +86,10 @@ public class Article implements Parcelable {
in.readList(attachments, Attachment.class.getClassLoader());
feed_title = in.readString();
+
+ comments_count = in.readInt();
+ comments_link = in.readString();
+ always_display_attachments = in.readInt() == 1;
}
@SuppressWarnings("rawtypes")