Rebase master

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-01-12 14:17:06 +01:00 committed by Jonas Mayer
parent df7f32cd1e
commit bb0a580ada
2 changed files with 6 additions and 6 deletions

View file

@ -68,8 +68,8 @@ class FilesUploadWorker(
val context: Context,
params: WorkerParameters
) : Worker(context, params), OnDatatransferProgressListener {
private var lastPercent = 0
private var lastPercent = 0
private val notificationManager = UploadNotificationManager(context, viewThemeUtils)
private val intents = FileUploaderIntents(context)
private val fileUploaderDelegate = FileUploaderDelegate()
@ -134,9 +134,6 @@ class FilesUploadWorker(
}
}
/**
* from @{link FileUploader#retryUploads()}
*/
private fun createUploadFileOperation(upload: OCUpload, user: User): UploadFileOperation {
return UploadFileOperation(
uploadsStorageManager,

View file

@ -60,6 +60,8 @@ class FilesUploadHelper {
companion object {
private val TAG = FilesUploadWorker::class.java.simpleName
// TODO is needed with worker?
// val pendingUploads = IndexedForest<UploadFileOperation>()
val mBoundListeners = HashMap<String, OnDatatransferProgressListener>()
fun buildRemoteName(accountName: String, remotePath: String): String {
@ -215,8 +217,9 @@ class FilesUploadHelper {
backgroundJobManager.startFilesUploadJob(user)
}
fun cancel(accountName: String?) {
// cancelPendingUploads(accountName)
fun cancel(accountName: String) {
// pendingUploads.remove(accountName)
uploadsStorageManager.removeUploads(accountName)
restartUploadJob(accountManager.getUser(accountName).get())
}