add an option to hide content previews in headlines list (closes #606)

This commit is contained in:
Andrew Dolgov 2013-03-21 10:03:50 +04:00
parent b76380a388
commit 7358405040
4 changed files with 22 additions and 10 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="145"
android:versionName="1.22" >
android:versionCode="146"
android:versionName="1.23" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -158,4 +158,6 @@
<string name="theme_dark_gray">Dark gray</string>
<string name="offline_articles_to_download">Number of articles to download</string>
<string name="offline_articles_to_download_long">Number of articles to download for Offlinemode. (newest first)</string>
<string name="pref_headlines_show_content_long">Show content previews in headlines list</string>
<string name="pref_headlines_show_content">Preview article content</string>
</resources>

View File

@ -86,6 +86,12 @@
android:key="default_view_mode"
android:summary="@string/pref_default_view_mode_long"
android:title="@string/pref_default_view_mode" />
<CheckBoxPreference
android:defaultValue="true"
android:key="headlines_show_content"
android:summary="@string/pref_headlines_show_content_long"
android:title="@string/pref_headlines_show_content" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/reading" >
<ListPreference

View File

@ -650,6 +650,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
String articleContent = article.content != null ? article.content : "";
if (te != null) {
if (!m_prefs.getBoolean("headlines_show_content", true)) {
te.setVisibility(View.GONE);
} else {
String excerpt = Jsoup.parse(articleContent).text();
if (excerpt.length() > 200)
@ -657,6 +660,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
te.setText(excerpt);
}
}
/* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator);