diff --git a/app/src/main/java/com/hippo/ehviewer/client/data/ListUrlBuilder.java b/app/src/main/java/com/hippo/ehviewer/client/data/ListUrlBuilder.java
index d4d996214..69f22dde0 100644
--- a/app/src/main/java/com/hippo/ehviewer/client/data/ListUrlBuilder.java
+++ b/app/src/main/java/com/hippo/ehviewer/client/data/ListUrlBuilder.java
@@ -19,6 +19,7 @@ package com.hippo.ehviewer.client.data;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.IntDef;
+import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.hippo.ehviewer.client.EhConfig;
@@ -141,6 +142,7 @@ public class ListUrlBuilder implements Cloneable, Parcelable {
mMinRating = minRating;
}
+ @Nullable
public String getImagePath() {
return mImagePath;
}
@@ -196,6 +198,10 @@ public class ListUrlBuilder implements Cloneable, Parcelable {
mKeyword = q.keyword;
mAdvanceSearch = q.advanceSearch;
mMinRating = q.minRating;
+ mImagePath = null;
+ mUseSimilarityScan = false;
+ mOnlySearchCovers = false;
+ mShowExpunged = false;
}
public QuickSearch toQuickSearch() {
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 8de70e2c2..1e0b3c1bf 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
@@ -90,6 +90,7 @@ import com.hippo.yorozuya.AnimationUtils;
import com.hippo.yorozuya.AssertUtils;
import com.hippo.yorozuya.MathUtils;
import com.hippo.yorozuya.SimpleAnimatorListener;
+import com.hippo.yorozuya.StringUtils;
import com.hippo.yorozuya.ViewUtils;
import java.io.File;
@@ -562,6 +563,12 @@ public final class GalleryListScene extends BaseScene
return;
}
+ // Can't add image search as quick search
+ if (ListUrlBuilder.MODE_IMAGE_SEARCH == urlBuilder.getMode()) {
+ showTip(R.string.image_search_not_quick_search, LENGTH_SHORT);
+ return;
+ }
+
// Check duplicate
for (QuickSearch q: list) {
if (urlBuilder.equalsQuickSearch(q)) {
@@ -1278,7 +1285,8 @@ public final class GalleryListScene extends BaseScene
request.setMethod(EhClient.METHOD_IMAGE_SEARCH);
request.setCallback(new GetGalleryListListener(getContext(),
activity.getStageId(), getTag(), taskId));
- request.setArgs(new File(mUrlBuilder.getImagePath()), mUrlBuilder.isUseSimilarityScan(),
+ request.setArgs(new File(StringUtils.avoidNull(mUrlBuilder.getImagePath())),
+ mUrlBuilder.isUseSimilarityScan(),
mUrlBuilder.isOnlySearchCovers(), mUrlBuilder.isShowExpunged());
mClient.execute(request);
} else {
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 67e011f98..4f9440a11 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -154,6 +154,7 @@
这里是快速搜索
画廊列表的状态将被保存为快速搜索。如果你想保存搜索面板的状态,请先执行搜索。
读我
+ 无法添加图片搜索为快速搜索
已存在相同的快速搜索,名称为“%s”。
已存在相同名称
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index 6b464ccdf..d158ab3b7 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -154,6 +154,7 @@
這裏是快速搜索
畫廊列表的狀態將被保存為快速搜索。如果你想保存搜索面板的狀態,請先執行搜索。
讀我
+ 無法添加圖片搜索為快速搜索
已存在相同的快速搜索,名稱為“%s”。
已存在相同名稱
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index ca4a16192..b11466a98 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -154,6 +154,7 @@
這裡是快速搜尋
畫廊列表的狀態將被儲存為快速搜尋。如果你想儲存搜尋面板的狀態,請先執行搜尋。
讀我
+ 無法新增圖片搜尋為快速搜尋
已存在相同的快速搜尋,名稱為“%s”。
已存在相同名稱
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9a1cd8ef8..bc16b407c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -196,6 +196,7 @@
Quick search will be shown here
The state of gallery list will be saved as quick search. Apply search first if you want to save the state of search panel.
README
+ Can\'t add image search as quick search
A duplicate quick search exists. The name is \"%s\".
A duplicate name exists
diff --git a/unifile b/unifile
index 704956a6f..e020c4cb3 160000
--- a/unifile
+++ b/unifile
@@ -1 +1 @@
-Subproject commit 704956a6f50876976a68c7e7f9c9fc979aa688ae
+Subproject commit e020c4cb336e5b09e4e352d68e35322d11584768