mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Rebase master
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
df7f32cd1e
commit
bb0a580ada
2 changed files with 6 additions and 6 deletions
|
@ -68,8 +68,8 @@ class FilesUploadWorker(
|
||||||
val context: Context,
|
val context: Context,
|
||||||
params: WorkerParameters
|
params: WorkerParameters
|
||||||
) : Worker(context, params), OnDatatransferProgressListener {
|
) : Worker(context, params), OnDatatransferProgressListener {
|
||||||
private var lastPercent = 0
|
|
||||||
|
|
||||||
|
private var lastPercent = 0
|
||||||
private val notificationManager = UploadNotificationManager(context, viewThemeUtils)
|
private val notificationManager = UploadNotificationManager(context, viewThemeUtils)
|
||||||
private val intents = FileUploaderIntents(context)
|
private val intents = FileUploaderIntents(context)
|
||||||
private val fileUploaderDelegate = FileUploaderDelegate()
|
private val fileUploaderDelegate = FileUploaderDelegate()
|
||||||
|
@ -134,9 +134,6 @@ class FilesUploadWorker(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* from @{link FileUploader#retryUploads()}
|
|
||||||
*/
|
|
||||||
private fun createUploadFileOperation(upload: OCUpload, user: User): UploadFileOperation {
|
private fun createUploadFileOperation(upload: OCUpload, user: User): UploadFileOperation {
|
||||||
return UploadFileOperation(
|
return UploadFileOperation(
|
||||||
uploadsStorageManager,
|
uploadsStorageManager,
|
||||||
|
|
|
@ -60,6 +60,8 @@ class FilesUploadHelper {
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = FilesUploadWorker::class.java.simpleName
|
private val TAG = FilesUploadWorker::class.java.simpleName
|
||||||
|
|
||||||
|
// TODO is needed with worker?
|
||||||
|
// val pendingUploads = IndexedForest<UploadFileOperation>()
|
||||||
val mBoundListeners = HashMap<String, OnDatatransferProgressListener>()
|
val mBoundListeners = HashMap<String, OnDatatransferProgressListener>()
|
||||||
|
|
||||||
fun buildRemoteName(accountName: String, remotePath: String): String {
|
fun buildRemoteName(accountName: String, remotePath: String): String {
|
||||||
|
@ -215,8 +217,9 @@ class FilesUploadHelper {
|
||||||
backgroundJobManager.startFilesUploadJob(user)
|
backgroundJobManager.startFilesUploadJob(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cancel(accountName: String?) {
|
fun cancel(accountName: String) {
|
||||||
// cancelPendingUploads(accountName)
|
// pendingUploads.remove(accountName)
|
||||||
|
uploadsStorageManager.removeUploads(accountName)
|
||||||
restartUploadJob(accountManager.getUser(accountName).get())
|
restartUploadJob(accountManager.getUser(accountName).get())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue