Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Dec 12, 2024

  • Tests written, or not not needed

Issue #13906

Changes:

• Fixed the issue of scheduling too many FileDownloadWorker instances for folder sync.
• Improved file download status observation, including states like syncing, downloading, and downloaded.
• Better constraints for worker
• Enhanced folder sync progress observation in notifications.
• Optimized performance using CoroutineWorker.

Demo New Notifications

Screen.Recording.2025-03-20.at.11.33.31.mp4

@alperozturk96 alperozturk96 marked this pull request as draft December 12, 2024 10:16
@alperozturk96 alperozturk96 changed the title Feature/sync worker Feature - Sync Worker Dec 12, 2024
@alperozturk96 alperozturk96 force-pushed the feature/sync-worker branch 3 times, most recently from 57990c8 to 0c5db2c Compare December 19, 2024 08:40
@alperozturk96 alperozturk96 marked this pull request as ready for review December 19, 2024 11:14
}
} else {
mFilesForDirectDownload.forEach(file -> fileDownloadHelper.downloadFile(user, file));
fileDownloadHelper.syncFolder(mLocalFolder);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since SyncWorker is responsible for preparing the files, there is no need to pass an array of files to the worker. Additionally, in scenarios where a user attempts to sync a large number of files (e.g., 1,000 files), the app could freeze or crash due to limitations associated with passing a large amount of data between classes via inputData.

@alperozturk96 alperozturk96 mentioned this pull request Dec 30, 2024
1 task
@alperozturk96 alperozturk96 added this to the Nextcloud App 3.31.0 milestone Jan 21, 2025
@alperozturk96 alperozturk96 changed the title Feature - Sync Worker Add Sync Worker Jan 21, 2025
@alperozturk96 alperozturk96 force-pushed the feature/sync-worker branch 2 times, most recently from 5f8baf6 to 5422ca6 Compare January 24, 2025 08:32
@alperozturk96 alperozturk96 force-pushed the feature/sync-worker branch 2 times, most recently from d41acbd to 35752db Compare February 10, 2025 15:30
@tobiasKaminsky tobiasKaminsky removed this from the Nextcloud App 3.31.0 milestone Feb 11, 2025
@tobiasKaminsky

This comment was marked as resolved.

@alperozturk96

This comment was marked as resolved.

@alperozturk96 alperozturk96 force-pushed the feature/sync-worker branch 2 times, most recently from 971956c to bff91ce Compare September 25, 2025 14:41
@alperozturk96 alperozturk96 marked this pull request as ready for review September 25, 2025 15:00
@alperozturk96
Copy link
Collaborator Author

alperozturk96 commented Sep 25, 2025

@jancborchardt We can merge it after get approval from @tobiasKaminsky :)

How to test?

  1. Create a folder containing multiple files and subfolders.
  2. Initiate a folder sync.

The sync icon should be displayed for the folder itself and for its sub-files. Subfolders and the files within those subfolders should not be downloaded (because).

When the user reopens the app, the sync icons for the already downloaded folders and subfiles should remain visible.

@alperozturk96 alperozturk96 force-pushed the feature/sync-worker branch 3 times, most recently from 559ad4a to 72e45a9 Compare October 6, 2025 14:28
@alperozturk96 alperozturk96 linked an issue Oct 6, 2025 that may be closed by this pull request
4 tasks
# Conflicts:
#	app/src/main/java/com/nextcloud/utils/extensions/FileDataStorageManagerExtensions.kt
#	app/src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.kt
#	app/src/main/res/layout/synced_folders_item_header.xml

# Conflicts:
#	app/src/main/java/com/nextcloud/client/jobs/download/FileDownloadHelper.kt
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@nextcloud nextcloud deleted a comment from github-actions bot Oct 10, 2025
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Copy link

Codacy

Lint

TypemasterPR
Warnings4545
Errors1111

SpotBugs

SpotBugs increased!

Copy link

Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14166.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. to develop don't merge performance 🚀 Performance improvement opportunities (non-crash related)

Projects

None yet

4 participants