Skip to content

fix(upload-list): improve performance, notify observers on main thread#16787

Merged
alperozturk96 merged 2 commits intomasterfrom
fix/upload-list-activity-adapter-update
Apr 1, 2026
Merged

fix(upload-list): improve performance, notify observers on main thread#16787
alperozturk96 merged 2 commits intomasterfrom
fix/upload-list-activity-adapter-update

Conversation

@alperozturk96
Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 commented Apr 1, 2026

Issue

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter position HeaderViewHolder{ffdbfb8 position=5 id=-1, oldPos=-1, pLpos:-1
...adapter:com.owncloud.android.ui.adapter.UploadListAdapter@8b71d77 

Changes

  • Notify observers on the main thread from UploadStorageManager.
  • Convert UploadListActivity.java to Kotlin and simplify its logic.

Side notes

To achieve better performance and a smoother user experience in the upload list, the following components need proper thread handling:

UploadStorageManager
UploadListActivity
UploadListAdapter
...

So that we can fully leverage Kotlin features such as coroutines, null safety, and improved thread management. It also provides greater flexibility for future work, especially the planned implementation of navigation. Conversion activities to fragments.

The next step will be converting UploadStorageManager. Then probably rely on DAO functions instead of cursor overhead.

@alperozturk96 alperozturk96 added this to the Nextcloud App 33.1.0 milestone Apr 1, 2026
@alperozturk96 alperozturk96 added the performance 🚀 Performance improvement opportunities (non-crash related) label Apr 1, 2026
@alperozturk96 alperozturk96 requested a review from mahibi April 1, 2026 08:21
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 force-pushed the fix/upload-list-activity-adapter-update branch from c9ac281 to 83b49e9 Compare April 1, 2026 08:22
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice3837
Correctness7069
Dodgy code231230
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4242
Security1616
Total441438

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

APK file: https://github.com/nextcloud/android/actions/runs/23839146770/artifacts/6216373960
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@alperozturk96 alperozturk96 merged commit 566b580 into master Apr 1, 2026
18 of 21 checks passed
@alperozturk96 alperozturk96 deleted the fix/upload-list-activity-adapter-update branch April 1, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: auto upload performance 🚀 Performance improvement opportunities (non-crash related)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants