Show require signing in tip in FavoriteScene
This commit is contained in:
1 parent
48face0e9e
commit
6659fefc21
5 files changed
+10
No files matched your search
@@ -16,7 +16,10 @@
|
||||
|
||||
package com.hippo.ehviewer.client.parser;
|
||||
|
||||
import com.hippo.ehviewer.GetText;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo;
|
||||
import com.hippo.ehviewer.client.exception.EhException;
|
||||
import com.hippo.ehviewer.client.exception.ParseException;
|
||||
import com.hippo.util.JsoupUtils;
|
||||
import com.hippo.yorozuya.AssertUtils;
|
||||
@@ -45,6 +48,9 @@ public class FavoritesParser {
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public static Result parse(String body) throws Exception {
|
||||
if (body.contains("This page requires you to log on.</p>")) {
|
||||
throw new EhException(GetText.getString(R.string.need_sign_in));
|
||||
}
|
||||
String[] catArray = new String[10];
|
||||
int[] countArray = new int[10];
|
||||
int current;
|
||||
|
||||
@@ -474,6 +474,7 @@
|
||||
<string name="let_me_select">让我选择</string>
|
||||
<string name="favorites_info">收藏信息</string>
|
||||
<string name="collections">收藏夹</string>
|
||||
<string name="need_sign_in">需要登录</string>
|
||||
|
||||
<!-- Progress Scene -->
|
||||
<string name="error_something_wrong_happened">被玩坏了</string>
|
||||
|
||||
@@ -474,6 +474,7 @@
|
||||
<string name="let_me_select">讓我選擇</string>
|
||||
<string name="favorites_info">收藏信息</string>
|
||||
<string name="collections">收藏夾</string>
|
||||
<string name="need_sign_in">需要登錄</string>
|
||||
|
||||
<!-- Progress Scene -->
|
||||
<string name="error_something_wrong_happened">被玩壞了</string>
|
||||
|
||||
@@ -474,6 +474,7 @@
|
||||
<string name="let_me_select">讓我選擇</string>
|
||||
<string name="favorites_info">收藏資訊</string>
|
||||
<string name="collections">收藏夾</string>
|
||||
<string name="need_sign_in">需要登入</string>
|
||||
|
||||
<!-- Progress Scene -->
|
||||
<string name="error_something_wrong_happened">被玩壞了</string>
|
||||
|
||||
@@ -521,6 +521,7 @@
|
||||
<string name="let_me_select">Let me select</string>
|
||||
<string name="favorites_info">Favorites info</string>
|
||||
<string name="collections">Collections</string>
|
||||
<string name="need_sign_in">Signing in is required</string>
|
||||
|
||||
<!-- Progress Scene -->
|
||||
<string name="error_something_wrong_happened">Something wrong happened</string>
|
||||
|
||||
Reference in new issue
Block a user