Improve large file download#17169
Conversation
| MockKAnnotations.init(this) | ||
| every { mockFileUploaderBinder.isUploading(any(), any()) } returns false | ||
| every { mockComponentsGetter.fileUploaderHelper } returns mockFileUploaderBinder | ||
| every { mockFileDownloadProgressListener.isDownloading(any(), any()) } returns false |
There was a problem hiding this comment.
isDownloading left over from foreground services no need this since worker is used
| @Suppress("MagicNumber") | ||
| fun prepareForStart(operation: DownloadFileOperation) { | ||
| currentOperationTitle = File(operation.savePath).name | ||
| currentOperationTitle = operation.file.fileName |
There was a problem hiding this comment.
Uses file name
| @Suppress("MagicNumber") | ||
| fun updateDownloadProgress(percent: Int, totalToTransfer: Long) { | ||
| // If downloads are so fast, no need to notify again. | ||
| if (percent == lastPercent) { |
There was a problem hiding this comment.
Already outer call have this
| private suspend fun trySetForeground(filename: String) { | ||
| try { | ||
| val foregroundInfo = createWorkerForegroundInfo() | ||
| val foregroundInfo = createWorkerForegroundInfo(filename) |
There was a problem hiding this comment.
Fixes empty notification
|
/backport to stable-34.0.x |
|
APK file: https://github.com/nextcloud/android/actions/runs/27345115706/artifacts/7569119183 |
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>
da3eca3 to
97fb133
Compare
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
APK file: https://github.com/nextcloud/android/actions/runs/27616645895/artifacts/7666867329 |
Changes