From 65e908546bd52f0442ffbed2ee1c35679e39e218 Mon Sep 17 00:00:00 2001 From: seven332 Date: Thu, 29 May 2014 22:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20sad=20panda=20=E8=AF=86?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hippo/ehviewer/ehclient/EhClient.java | 4 ++++ src/com/hippo/ehviewer/ehclient/ListParser.java | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/hippo/ehviewer/ehclient/EhClient.java b/src/com/hippo/ehviewer/ehclient/EhClient.java index c4b532ea8..0625dad37 100644 --- a/src/com/hippo/ehviewer/ehclient/EhClient.java +++ b/src/com/hippo/ehviewer/ehclient/EhClient.java @@ -589,7 +589,11 @@ public class EhClient { break; case ListParser.NOT_FOUND: maxPage = 0; + indexPerPage = parser.indexPerPage; + lmdArray = new ArrayList(); break; + case ListParser.PARSER_ERROR: + eMsg = "parser error"; } } else eMsg = hp.getEMsg(); diff --git a/src/com/hippo/ehviewer/ehclient/ListParser.java b/src/com/hippo/ehviewer/ehclient/ListParser.java index 236a2af9b..7ea716e27 100644 --- a/src/com/hippo/ehviewer/ehclient/ListParser.java +++ b/src/com/hippo/ehviewer/ehclient/ListParser.java @@ -31,7 +31,7 @@ public class ListParser { public static final int SAD_PANDA = 0x3; public static final int PARSER_ERROR = -1; - public int indexPerPage; + public int indexPerPage = 25; public int maxPage; public ArrayList giList; @@ -49,8 +49,6 @@ public class ListParser { int maxIndex = Integer.parseInt(m.group(3).replace(",", "")); if (endIndex != maxIndex || startIndex == 1) indexPerPage = endIndex - startIndex + 1; - else - indexPerPage = 25; // default maxPage = (maxIndex + indexPerPage - 1) / indexPerPage; } else if (pageContext.contains("No hits found

")) { maxPage = 0;