From 655c299d69f19187b86440b131617cc08e1530ec Mon Sep 17 00:00:00 2001 From: Haleydu <924323178@qq.com> Date: Sun, 8 Nov 2020 20:27:32 +0800 Subject: [PATCH] Fixed unviewable problem after download, closed #129 --- .../hiroshi/cimoc/fresco/processor/MangaPostprocessor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/hiroshi/cimoc/fresco/processor/MangaPostprocessor.java b/app/src/main/java/com/hiroshi/cimoc/fresco/processor/MangaPostprocessor.java index 86bf093c..335e8915 100644 --- a/app/src/main/java/com/hiroshi/cimoc/fresco/processor/MangaPostprocessor.java +++ b/app/src/main/java/com/hiroshi/cimoc/fresco/processor/MangaPostprocessor.java @@ -262,15 +262,13 @@ private boolean isWhite(int pixel) { public void decodeJMTTImage(Bitmap sourceBitmap, CloseableReference reference){ String url = mImage.getUrl(); int scramble_id = 220980; - String id = null; int chapterId = 0; - if (url.startsWith("file://")){ - id = StringUtils.match("Cimoc/download/(72)/", url, 1); + if (url.startsWith("file://Cimoc/download/72/")){ chapterId = Integer.parseInt(Objects.requireNonNull(StringUtils.match("/-photo-(\\d*)/", url, 1))); } if((url.contains("media/photos") && Integer.parseInt(url.substring(url.indexOf("photos/") + 7, url.lastIndexOf("/"))) > scramble_id) - || (id != null && !id.equals("") && chapterId>scramble_id)){ + || chapterId > scramble_id) { Bitmap resultBitmap = reference.get(); float rows = 10; float chunkHeight = mHeight / rows;