diff --git a/res/values/strings.xml b/res/values/strings.xml
index c3e700c9de65..ca7563da6e7b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -603,8 +603,8 @@
Optional comment
- One new article
- %d new articles
+ One new post
+ %d new posts
Added %s
Removed %s
Reblog this post to
@@ -637,10 +637,10 @@
Freshly Pressed
- No articles with this tag.
- No articles with this tag yet.
+ No post in this topic.
+ Fetching posts…
You don\'t follow any tags.
- No popular tags
+ No popular tags.
You\'re not following any blogs yet.
But don\'t worry, just tap the tag icon to start exploring!
You have not liked any posts.
diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java
index 7d7eab52a8a8..6412710c3b4f 100644
--- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java
+++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java
@@ -196,29 +196,30 @@ private void startBoxAndPagesAnimation() {
}
private void setEmptyTitleAndDecriptionForCurrentTag() {
- boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag);
+ if (!isPostAdapterEmpty()) {
+ return ;
+ }
int title, description = -1;
- int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag);
-
- final String tagId;
- if (tagIndex > -1) {
- ReaderTag tag = (ReaderTag) getActionBarAdapter().getItem(tagIndex);
- tagId = tag.getStringIdFromEndpoint();
+ if (isUpdating()) {
+ title = R.string.reader_empty_posts_in_topic_updating;
} else {
- tagId = "";
- }
+ int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag);
- if (tagId.equals("following")) {
- title = R.string.reader_empty_followed_blogs_title;
- description = R.string.reader_empty_followed_blogs_description;
- } else {
- if (tagId.equals("liked")) {
- title = R.string.reader_empty_posts_liked;
+ final String tagId;
+ if (tagIndex > -1) {
+ ReaderTag tag = (ReaderTag) getActionBarAdapter().getItem(tagIndex);
+ tagId = tag.getStringIdFromEndpoint();
} else {
- if (hasTagEverUpdated) {
- title = R.string.reader_empty_posts_in_tag;
+ tagId = "";
+ }
+ if (tagId.equals("following")) {
+ title = R.string.reader_empty_followed_blogs_title;
+ description = R.string.reader_empty_followed_blogs_description;
+ } else {
+ if (tagId.equals("liked")) {
+ title = R.string.reader_empty_posts_liked;
} else {
- title = R.string.reader_empty_posts_in_tag_never_updated;
+ title = R.string.reader_empty_posts_in_topic;
}
}
}
@@ -381,6 +382,8 @@ private void updatePostsWithTag(final String tagName, final ReaderActions.Reques
}
setIsUpdating(true, updateAction);
+ // update empty view title and description if the the post list is empty
+ setEmptyTitleAndDecriptionForCurrentTag();
ReaderPostActions.updatePostsWithTag(tagName, updateAction, new ReaderActions.UpdateResultAndCountListener() {
@Override
@@ -398,6 +401,9 @@ public void onUpdateResult(ReaderActions.UpdateResult result, int numNewPosts) {
} else {
refreshPosts();
}
+ } else {
+ // update empty view title and description if the the post list is empty
+ setEmptyTitleAndDecriptionForCurrentTag();
}
// schedule the next update in this tag
if (result != ReaderActions.UpdateResult.FAILED)
@@ -409,12 +415,12 @@ public void onUpdateResult(ReaderActions.UpdateResult result, int numNewPosts) {
protected boolean isUpdating() {
return mIsUpdating;
}
+
protected void setIsUpdating(boolean isUpdating, ReaderActions.RequestDataAction updateAction) {
if (mIsUpdating==isUpdating)
return;
if (!hasActivity())
return;
-
mIsUpdating = isUpdating;
switch (updateAction) {
case LOAD_NEWER: