Compare commits

..
Author SHA1 Message Date
txyyh e1820617a9 Rel 1.7.31.0-alpha04
Releases / Build (push) Has been cancelled
2022-11-06 07:22:01 +00:00
tarsin 512e529b51 No gallery found no more a exception 2022-11-06 07:02:27 +00:00
tarsin 9b0766dd6e Fix favourite list load first 2022-11-06 07:02:27 +00:00
txyyh f56bf7da8b Rel 1.7.31.0-alpha03
Releases / Build (push) Has been cancelled
2022-11-05 09:52:26 +00:00
小白-白 ee895a92cd Remove preview count limit #332 (#333)
fix: preview count limit
2022-11-04 17:23:25 +00:00
老虎豆 2fbc343b55 Fix when clicking cover in download that don't enter gallery detail(#251) (#305)
Fix when clicking cover in download that don't enter gallery detail
2022-11-04 17:23:25 +00:00
小白-白 dccd02f15e Fix favorite page load (#368)
修复收藏页面按发布时间排序时无法翻页问题
2022-11-04 04:12:44 +00:00
5 changed files with 10 additions and 11 deletions

No files matched your search

+2 -2
View File
@@ -35,8 +35,8 @@ android {
applicationId "moe.tarsin.ehviewer"
minSdkVersion 26
targetSdkVersion 33
versionCode 114537
versionName "1.7.31.0-alpha02"
versionCode 114539
versionName "1.7.31.0-alpha04"
resConfigs 'zh', 'zh-rCN', 'zh-rHK', 'zh-rTW', 'es', 'ja', 'ko', 'fr', 'de', 'th'
}
@@ -34,7 +34,7 @@ import java.util.List;
import java.util.regex.Pattern;
public class FavoritesParser {
private static final Pattern PATTERN_NEXT_PAGE = Pattern.compile("next=(\\d+-\\d+)");
private static final Pattern PATTERN_NEXT_PAGE = Pattern.compile("next=(\\d+(-\\d+)?)");
public static Result parse(String body) throws Exception {
if (body.contains("This page requires you to log on.</p>")) {
@@ -65,9 +65,9 @@ public class FavoritesParser {
try {
var d = Jsoup.parse(body);
var snv = d.getElementsByClass("searchnav").first();
assert snv != null;
var href = snv.child(3).child(0).attr("href");
var next = d.getElementById("unext");
assert next != null;
var href = next.attr("href");
var matcher = PATTERN_NEXT_PAGE.matcher(href);
if (matcher.find()) {
re.nextPage = matcher.group(1);
@@ -333,7 +333,7 @@ public class GalleryListParser {
}
if (list.isEmpty()) {
if (es.size() < 2 || !NO_UNFILTERED_TEXT.equals(es.get(1).text())) {
throw new ParseException("No gallery", body);
Log.d(TAG, "No gallery found");
}
}
result.galleryInfoList = list;
@@ -1067,7 +1067,7 @@ public class GalleryDetailScene extends ToolbarScene implements View.OnClickList
if (gd.previewPages <= 0 || previewSet == null || previewSet.size() == 0) {
mPreviewText.setText(R.string.no_previews);
return;
} else if (gd.previewPages == 1 && previewSet.size() <= 60) {
} else if (gd.previewPages == 1) {
mPreviewText.setText(R.string.no_more_previews);
} else {
mPreviewText.setText(R.string.more_previews);
@@ -1076,8 +1076,7 @@ public class GalleryDetailScene extends ToolbarScene implements View.OnClickList
int columnWidth = resources.getDimensionPixelOffset(Settings.getThumbSizeResId());
mGridLayout.setColumnSize(columnWidth);
mGridLayout.setStrategy(SimpleGridAutoSpanLayout.STRATEGY_SUITABLE_SIZE);
int size = Math.min(60, previewSet.size());
for (int i = 0; i < size; i++) {
for (int i = 0, size = previewSet.size(); i < size; i++) {
View view = inflater.inflate(R.layout.item_gallery_preview, mGridLayout, false);
mGridLayout.addView(view);
+1 -1
View File
@@ -40,7 +40,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
app:alwaysCutAndScale="true"
app:retryType="click"/>
app:retryType="longClick"/>
</com.google.android.material.card.MaterialCardView>