Skip to content

Commit

Permalink
Fixed unviewable problem after download, closed #129
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleydu committed Nov 8, 2020
1 parent 8a792ce commit 655c299
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,13 @@ private boolean isWhite(int pixel) {
public void decodeJMTTImage(Bitmap sourceBitmap, CloseableReference<Bitmap> 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;
Expand Down

0 comments on commit 655c299

Please sign in to comment.