avito-tech / krop

Small widget for image cropping in Instagram-like style
MIT License
126 stars 18 forks source link

Fix check in ZoomableImageView #7

Closed vararg closed 6 years ago

vararg commented 6 years ago

Fix for issue https://github.com/avito-tech/krop/issues/6 Rework checking logic, now it correctly work with cases when prevMatchViewSize store 0 values.

luckcoolla commented 6 years ago

do you have plans to merge the PR?)

vararg commented 6 years ago

Nice question. Looks like no one cares about this bug.

solkin commented 6 years ago

What about savePreviousImageValues() invocation? It was removed.

vararg commented 6 years ago

Yes, it was removed from this flow.

This invocation looks like workaround, you say something like "Okay we already have imageRenderedAtLeastOnce = true, but if sizes = 0 let's try to get previous image values". Main question is why sizes can be 0 when imageRenderedAtLeastOnce already triggered.

And I can't give answer on this question. I just want to show case when: 1) imageRenderedAtLeastOnce = true 2) sizes = 0 3) Invoking savePreviousImageValues() doesn't help you. Because it also will give you 0.

solkin commented 6 years ago

I checked this implementation. It works.