-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Glide with Coil #403
Conversation
...dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt
Show resolved
Hide resolved
if (!subsamplingImageLoadFailed) { | ||
if (ivZoom.isZoomed) { | ||
progress.isVisible = true | ||
ivZoom.isZoomEnabled = false | ||
ivZoom.resetZoom() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use positive boolean to improve this block of code. See https://testing.googleblog.com/2023/10/improve-readability-with-positive.html
if (!subsamplingImageLoadFailed) { | |
if (ivZoom.isZoomed) { | |
progress.isVisible = true | |
ivZoom.isZoomEnabled = false | |
ivZoom.resetZoom() | |
} | |
if (subsamplingImageLoadSuccess) { | |
with(ivZoom) { | |
if (isZoomed) { | |
isVisible = true | |
isZoomEnabled = false | |
resetZoom() | |
} | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition should only be met until subsampling image fails. We cannot claim that subsampling image was successfully loaded from very beginning. It hasn't failed or been successful yet. But I'll add comments to make it clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that makes sense
...dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@mdrlzy the PR in the arklib-android has been merged: |
@mdrlzy any chance to complete this one? 😉 |
Yeah, but there is no new release of |
@mdrlzy thanks for letting know, I've published |
Test files |
Quality Gate failedFailed conditions 0.0% Coverage on New Code (required ≥ 80%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
No description provided.