-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Improve File Download Worker #13975
base: master
Are you sure you want to change the base?
Improve File Download Worker #13975
Conversation
031a1b9
to
72f37a8
Compare
@@ -25,17 +26,8 @@ class DownloadNotificationManager( | |||
) : WorkerNotificationManager(id, context, viewThemeUtils, R.string.downloader_download_in_progress_ticker) { | |||
|
|||
@Suppress("MagicNumber") | |||
fun prepareForStart(operation: DownloadFileOperation, currentDownloadIndex: Int, totalDownloadSize: Int) { |
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.
Since for each file new FileDownloadWork going to be scheduled, no need to track indexes.
af6aa74
to
02e216d
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
…name, do nothing. 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]>
5797cff
to
ea45d7e
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13975.apk |
Changes
Convert worker to CoroutineWorker
Call setForeground() before starting any task
Remove non-translatable texts
Remove total and current index tracking from DownloadNotificationManager. This feature can be reintroduced after addressing this issue. Refer to the Technical Explanation section for more details; without resolving this, the download status tracking feature is ineffective and nonfunctional.