-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
feat: Add a gallery of all the images present on the server (v2) #2801
Conversation
…ta` to better reflect its work
# Conflicts: # packages/smooth_app/lib/pages/product/product_image_gallery_view.dart
refactor: deduplicate code
…dart Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
# Conflicts: # packages/smooth_app/lib/pages/product/edit_product_page.dart
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-Authored-By: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>
Co-Authored-By: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>
packages/smooth_app/lib/pages/product/product_image_viewer.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/product/product_image_viewer.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/generic_lib/widgets/smooth_list_tile_card.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/generic_lib/widgets/smooth_list_tile_card.dart
Outdated
Show resolved
Hide resolved
…ard.dart Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-Authored-By: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>
@VaiTon in the next PR, we could add image flagging: https://github.com/openfoodfacts/hunger-games/pull/172/files |
@monsieurtanuki I've fixed the file names problem with the url hash. Please tell me your opinion |
@VaiTon That's better, but a hash is not unique. My suggestion is. |
@monsieurtanuki The hash should be unique. If the URL is the same there is no need to check if we're overwriting the image. Also we're not storing anything on the DB that we'd need to clean when we're done |
@monsieurtanuki I don't really find it something we should care about, as the probability of getting a collision should be really low, decreased by the fact that we should be dealing with different URLs each time. Despite that, just to make sure that there is no such case, I'm implementing the progressive number check. Now a question is: when do we need to reset the number to 0 ? Never? Every X days? |
@VaiTon Good, it's safer this way. And make sure that we can reuse your |
To avoid race conditions for image downloads (see previous commit)
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.
Thank you @VaiTon for those exchanges!
LGTM
Still not convinced by the RRect around the images, but we'll see later, let's merge now!
Thank you @monsieurtanuki for your reviews ! 🚀 🎉 |
What
Supersedes
2022-09-02.23-57-37.mp4