Skip to content

Commit 7d42d6c

Browse files
committed
#130 Make sure both onReady and onImageLoaded are called for bitmaps
1 parent 0e3b145 commit 7d42d6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/src/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,9 @@ private synchronized void onImageLoaded(Bitmap bitmap, int sOrientation, boolean
16231623
this.sWidth = bitmap.getWidth();
16241624
this.sHeight = bitmap.getHeight();
16251625
this.sOrientation = sOrientation;
1626-
if (checkReady() || checkImageLoaded()) {
1626+
boolean ready = checkReady();
1627+
boolean imageLoaded = checkImageLoaded();
1628+
if (ready || imageLoaded) {
16271629
invalidate();
16281630
requestLayout();
16291631
}

0 commit comments

Comments
 (0)