feat: Sort gallery by period - #2063
Draft
aymericmariaux wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds selectable day, month, or year grouping to the gallery.
Changes:
- Adds period-selection navigation and bottom sheet.
- Moves gallery grouping state into
GalleryViewModel. - Rebuilds sections and fast-scroll labels for the selected period.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
main_navigation.xml |
Adds period-selection dialog navigation. |
gallery_menu.xml |
Adds the gallery sorting action. |
fragment_menu_gallery.xml |
Attaches the new toolbar menu. |
MenuGalleryFragment.kt |
Opens and handles the period selector. |
GalleryViewModel.kt |
Manages gallery data and period grouping. |
GalleryPeriodBottomSheetDialog.kt |
Configures the selection dialog. |
GalleryPeriodBottomSheetAdapter.kt |
Displays period choices. |
GalleryPeriod.kt |
Defines periods and date patterns. |
GalleryFragment.kt |
Applies period changes to the gallery. |
GalleryAdapter.kt |
Updates display-list and fast-scroll handling. |
aymericmariaux
force-pushed
the
sort-gallery-by-period
branch
from
August 5, 2026 13:32
dd6feec to
dddd804
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (1)
app/src/main/java/com/infomaniak/drive/ui/menu/GalleryViewModel.kt:104
- Reformatting exposes an ordering mismatch after a multi-file copy:
prependDuplicatedImagesdisplaysduplicatedListin iteration order but currently inserts each item at index 0 ofgalleryList, reversing the backing order. Selecting another period then rebuilds from that reversed list and visibly flips the copied files. Insert the whole duplicate list at index 0 once so the adapter and backing list retain the same order.
return formatList(files)
aymericmariaux
force-pushed
the
sort-gallery-by-period
branch
from
August 6, 2026 06:31
609f40f to
e7621e6
Compare
|
❌ The last analysis has failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.