Only show tips for subscription if no watched tags
This commit is contained in:
1 parent
c0933eb8f0
commit
7e1e4a0f57
2 files changed
+3
-2
No files matched your search
@@ -64,6 +64,7 @@ public class GalleryListParser {
|
||||
public static class Result {
|
||||
public int pages;
|
||||
public int nextPage;
|
||||
public boolean noWatchedTags;
|
||||
public List<GalleryInfo> galleryInfoList;
|
||||
}
|
||||
|
||||
@@ -282,6 +283,7 @@ public class GalleryListParser {
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ExceptionUtils.throwIfFatal(e);
|
||||
result.noWatchedTags = body.contains("<p>You do not have any watched tags");
|
||||
if (body.contains("No hits found</p>")) {
|
||||
result.pages = 0;
|
||||
//noinspection unchecked
|
||||
|
||||
@@ -1453,8 +1453,7 @@ public final class GalleryListScene extends BaseScene
|
||||
private void onGetGalleryListSuccess(GalleryListParser.Result result, int taskId) {
|
||||
if (mHelper != null && mSearchBarMover != null &&
|
||||
mHelper.isCurrentTask(taskId)) {
|
||||
// TODO tell the difference between no result and subscribed tags
|
||||
String emptyString = getResources2().getString(mUrlBuilder.getMode() == ListUrlBuilder.MODE_SUBSCRIPTION
|
||||
String emptyString = getResources2().getString(mUrlBuilder.getMode() == ListUrlBuilder.MODE_SUBSCRIPTION && result.noWatchedTags
|
||||
? R.string.gallery_list_empty_hit_subscription
|
||||
: R.string.gallery_list_empty_hit);
|
||||
mHelper.setEmptyString(emptyString);
|
||||
|
||||
Reference in new issue
Block a user