fix(oc-file-list): favorite refresh#17018
Conversation
769f480 to
a8abad5
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/25664115298/artifacts/6916208022 |
35b9cdd to
cc97f6b
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/25673926941/artifacts/6920944020 |
a3b17e3 to
957d038
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/26213558275/artifacts/7130546129 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes duplicate/incorrect items and refresh behavior in the Favorites file list (especially after rename/delete) by improving cached vs remote search handling and making layout preferences independent per root tab.
Changes:
- Refactors
OCFileListSearchTaskto load sorted cached items first, then refresh from remote and update adapter deterministically. - Introduces
FolderLayoutand updates layout preference storage to distinguish All files / Favorites / Shared roots. - Adjusts rename/delete flows to refresh UI more consistently and avoids duplicate “virtual” insertions.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/owncloud/android/ui/fragment/OCFileListSearchTask.kt | Refactors cached/remote search flow; changes sorting and virtual file handling. |
| app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java | Tweaks initial loading state behavior and updates grid/list preference call site. |
| app/src/main/java/com/owncloud/android/ui/fragment/FolderLayout.kt | Adds a sealed type to key layout preferences by root tab vs child folder. |
| app/src/main/java/com/owncloud/android/ui/fragment/FileListLayoutManager.kt | Switches layout preference logic to use FolderLayout; adjusts grid span logic. |
| app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt | Simplifies rename logic with early returns; refactors target file variable. |
| app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java | Changes adapter update semantics; adds removeFile; removes addVirtualFile. |
| app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt | Updates empty-state handling and refactors rename/delete finish handling. |
| app/src/main/java/com/nextcloud/client/preferences/AppPreferencesImpl.java | Stores layout preferences by FolderLayout (root tabs per-account, child folders legacy). |
| app/src/main/java/com/nextcloud/client/preferences/AppPreferences.java | Updates layout preference API to accept FolderLayout. |
Comments suppressed due to low confidence (1)
app/src/main/java/com/owncloud/android/ui/fragment/OCFileListSearchTask.kt:1
sortSearchDatanow directly callsfragment.adapter.setSortOrder(sortOrder). In this PR,sortSearchData(...)is invoked from IO/background execution paths (e.g., inside theDispatchers.IOjob andloadSortedCachedDbFiles), which risks mutating UI/adapter state off the main thread. MakesortSearchDatapure (only sort/return values) and applysetSortOrder(...)on the main thread (or return the resolvedsortOrderalongside the sorted list).
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
APK file: https://github.com/nextcloud/android/actions/runs/26217725410/artifacts/7133299769 |
cea2794 to
7ccf01d
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/26225419392/artifacts/7135596855 |
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
…ate item Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
…task Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
0dfde6a to
40750a5
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/26273560952/artifacts/7154808323 |
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
|
APK file: https://github.com/nextcloud/android/actions/runs/26275274437/artifacts/7155548413 |
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
Issue
Duplicated items is displayed after rename favorite file
Steps to reproduce
Changes