diff --git a/app/src/main/java/com/community/pocket/util/HttpUtil.java b/app/src/main/java/com/community/pocket/util/HttpUtil.java
index c64e837..d05cca0 100644
--- a/app/src/main/java/com/community/pocket/util/HttpUtil.java
+++ b/app/src/main/java/com/community/pocket/util/HttpUtil.java
@@ -66,8 +66,13 @@ public class HttpUtil {
public void onFailure(@NotNull Call call, @NotNull IOException e) {
if (BuildConfig.DEBUG) {
Looper.prepare();
- new AlertDialog.Builder(context)
- .setMessage(context.getString(R.string.check_server_fail, BuildConfig.API_HOST)).show();
+ if (BuildConfig.API_HOST.contains("http")) {
+ new AlertDialog.Builder(context)
+ .setMessage(context.getString(R.string.check_server_fail, BuildConfig.API_HOST)).show();
+ } else {
+ new AlertDialog.Builder(context)
+ .setMessage(context.getString(R.string.error_api_host, BuildConfig.API_HOST)).show();
+ }
Looper.loop();
}
}
diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml
index 301d648..1d2a57d 100644
--- a/app/src/main/res/values-en-rUS/strings.xml
+++ b/app/src/main/res/values-en-rUS/strings.xml
@@ -177,4 +177,5 @@
uncheck
connect server ok
connect server:%1s fail
+ api error%1s
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index abbe476..08cef4a 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -177,4 +177,5 @@
未审核
连接服务端成功
调试信息:无法连接到服务端:%1s
+ 非法服务端配置:%1s
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4bb129e..6206619 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -178,6 +178,7 @@
uncheck
connect server ok
connect server:%1s fail
+ api error%1s