Merge pull request #57 from moneytoo/offline-preview
respect preview article content option in offline mode
This commit is contained in:
commit
8145f16e45
@ -561,6 +561,9 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
TextView te = (TextView)v.findViewById(R.id.excerpt);
|
TextView te = (TextView)v.findViewById(R.id.excerpt);
|
||||||
|
|
||||||
if (te != null) {
|
if (te != null) {
|
||||||
|
if (!m_prefs.getBoolean("headlines_show_content", true)) {
|
||||||
|
te.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
String excerpt = Jsoup.parse(article.getString(article.getColumnIndex("content"))).text();
|
String excerpt = Jsoup.parse(article.getString(article.getColumnIndex("content"))).text();
|
||||||
|
|
||||||
if (excerpt.length() > CommonActivity.EXCERPT_MAX_SIZE)
|
if (excerpt.length() > CommonActivity.EXCERPT_MAX_SIZE)
|
||||||
@ -583,6 +586,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
te.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize);
|
te.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize);
|
||||||
te.setText(excerpt);
|
te.setText(excerpt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TextView ta = (TextView)v.findViewById(R.id.author);
|
TextView ta = (TextView)v.findViewById(R.id.author);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user