ios
ios copied to clipboard
Redo Media view with proper media aspect ratio
trafficstars

Show images with correct aspect ratio instead of square thumbnails.
Code snippets:
- group by modification date per month, transform to rows, sort by date, newest first: https://github.com/nextcloud/android/blob/3b5d2a039196b1c0965d6b57a45b8cfd1edd6e17/app/src/main/java/com/owncloud/android/ui/adapter/GalleryAdapter.kt#L199
- one row contains of multiple images https://github.com/nextcloud/android/blob/66d8756bec47cd4d13efcd87212e43e55ea1090d/app/src/main/java/com/owncloud/android/ui/adapter/GalleryRowHolder.kt#L56
- computeShrinkRatio: https://github.com/nextcloud/android/blob/66d8756bec47cd4d13efcd87212e43e55ea1090d/app/src/main/java/com/owncloud/android/ui/adapter/GalleryRowHolder.kt#L101
- uses screen width, column and total width (adjusted by height) to have ratio
Resized images: https://github.com/nextcloud/android/blob/e236891827a2108724cdcd27ad4945ba6bd17166/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java#L1419
Is basically the same as when clicking on an image, which also simply downloads a resized image, but not entire one.
How it looks on Android:
update: 2 more weeks, to fix flickering on scrolling up and rotate bug