diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 4 | ||||
-rw-r--r-- | src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index b73121a7..2080b043 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -679,8 +679,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, TextView author = (TextView)v.findViewById(R.id.author); - if (author != null) { + if (author != null && articleAuthor.length() > 0) { author.setText(getString(R.string.author_formatted, articleAuthor)); + } else { + author.setText(""); } /* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator); diff --git a/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index b8ac6023..e89d01f4 100644 --- a/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/src/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -532,8 +532,14 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis if (ta != null) { int authorIndex = article.getColumnIndex("author"); - if (authorIndex >= 0) - ta.setText(article.getString(authorIndex)); + if (authorIndex >= 0) { + String author = article.getString(authorIndex); + + if (author != null && author.length() > 0) + ta.setText(getString(R.string.author_formatted, author)); + else + ta.setText(""); + } } /* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator); |