add an option to hide content previews in headlines list (closes #606)
This commit is contained in:
parent
b76380a388
commit
7358405040
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="145"
|
android:versionCode="146"
|
||||||
android:versionName="1.22" >
|
android:versionName="1.23" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="8"
|
android:minSdkVersion="8"
|
||||||
|
@ -158,4 +158,6 @@
|
|||||||
<string name="theme_dark_gray">Dark gray</string>
|
<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">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="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>
|
</resources>
|
||||||
|
@ -86,6 +86,12 @@
|
|||||||
android:key="default_view_mode"
|
android:key="default_view_mode"
|
||||||
android:summary="@string/pref_default_view_mode_long"
|
android:summary="@string/pref_default_view_mode_long"
|
||||||
android:title="@string/pref_default_view_mode" />
|
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>
|
||||||
<PreferenceCategory android:title="@string/reading" >
|
<PreferenceCategory android:title="@string/reading" >
|
||||||
<ListPreference
|
<ListPreference
|
||||||
|
@ -650,12 +650,16 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
String articleContent = article.content != null ? article.content : "";
|
String articleContent = article.content != null ? article.content : "";
|
||||||
|
|
||||||
if (te != null) {
|
if (te != null) {
|
||||||
String excerpt = Jsoup.parse(articleContent).text();
|
if (!m_prefs.getBoolean("headlines_show_content", true)) {
|
||||||
|
te.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
String excerpt = Jsoup.parse(articleContent).text();
|
||||||
|
|
||||||
if (excerpt.length() > 200)
|
if (excerpt.length() > 200)
|
||||||
excerpt = excerpt.substring(0, 200) + "...";
|
excerpt = excerpt.substring(0, 200) + "...";
|
||||||
|
|
||||||
te.setText(excerpt);
|
te.setText(excerpt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator);
|
/* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator);
|
||||||
|
Loading…
Reference in New Issue
Block a user