-
-
Notifications
You must be signed in to change notification settings - Fork 167
Option to sort vaults by vault name or cloud #616
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
base: develop
Are you sure you want to change the base?
Option to sort vaults by vault name or cloud #616
Conversation
WalkthroughThis pull request adds a vault sorting feature to the presentation layer. It introduces a new enum Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
49d6705 to
e97d5c9
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
presentation/src/main/java/org/cryptomator/presentation/ui/dialog/SortOverrideConfirmationDialog.kt (1)
19-19: Remove redundantpublicmodifier.The
publicvisibility modifier is redundant in Kotlin since it's the default for override methods.Apply this diff:
- public override fun setupDialog(builder: AlertDialog.Builder): android.app.Dialog { + override fun setupDialog(builder: AlertDialog.Builder): android.app.Dialog {- public override fun setupView() { + override fun setupView() {Also applies to: 26-26
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
presentation/src/main/java/org/cryptomator/presentation/model/VaultListSortOption.kt(1 hunks)presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt(6 hunks)presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt(4 hunks)presentation/src/main/java/org/cryptomator/presentation/ui/dialog/SortOverrideConfirmationDialog.kt(1 hunks)presentation/src/main/res/layout/dialog_sort_override_confirmation.xml(1 hunks)presentation/src/main/res/menu/menu_vault_list.xml(1 hunks)presentation/src/main/res/values/strings.xml(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
- presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt
- presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt
- presentation/src/main/res/values/strings.xml
- presentation/src/main/res/layout/dialog_sort_override_confirmation.xml
- presentation/src/main/java/org/cryptomator/presentation/model/VaultListSortOption.kt
- presentation/src/main/res/menu/menu_vault_list.xml
🔇 Additional comments (2)
presentation/src/main/java/org/cryptomator/presentation/ui/dialog/SortOverrideConfirmationDialog.kt (2)
1-17: LGTM! Clean dialog setup.The dialog structure, imports, and callback interface are well-organized. The use of view binding and the callback pattern is idiomatic for Android dialogs.
31-41: LGTM! Robust selection handling.The
selectedSortOption()method provides a safe fallback toNAME, and the companion factory method follows standard DialogFragment patterns. Combined with the default selection insetupView(), this ensures a valid sort option is always available.
|
Hey,
|
|
Hi, @JaniruTEC. Could you clarify one thing: when user selects "custom", do you want to just unlock DnD or you want to keep previous "custom" sorting saved somewhere when user selects "Location/Name" and restore it when users moves back to custom?
|
Hi guys.


This is my proposal for #347 issue. Currently the two ways are supported: alphabetical and by CloudType enum. Since this action is kinda destructive (since the user could have their own sorting via DnD) there is confirmation modal with proper text. We can, of course, add asc/desc option, but I didn't want to complicate things initially as even such sorting is better than none. Feel free to leave comments