diff --git a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java index c2122e207..a1e159227 100644 --- a/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java +++ b/app/src/main/java/com/hippo/ehviewer/client/parser/GalleryListParser.java @@ -64,6 +64,7 @@ public class GalleryListParser { public static class Result { public int pages; public int nextPage; + public boolean noWatchedTags; public List galleryInfoList; } @@ -282,6 +283,7 @@ public class GalleryListParser { } } catch (Throwable e) { ExceptionUtils.throwIfFatal(e); + result.noWatchedTags = body.contains("

You do not have any watched tags"); if (body.contains("No hits found

")) { result.pages = 0; //noinspection unchecked diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java index 263f89a33..8fd1f8157 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java @@ -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);