mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
resolve format violations in kotlin files
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
parent
70685974f3
commit
3cf0271e8f
3 changed files with 4 additions and 11 deletions
|
@ -462,7 +462,7 @@ internal class BackgroundJobManagerImpl(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun cancelFilesUploadJob(user: User) {
|
override fun cancelFilesUploadJob(user: User) {
|
||||||
workManager.cancelJob(JOB_FILES_UPLOAD,user)
|
workManager.cancelJob(JOB_FILES_UPLOAD, user)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun startPdfGenerateAndUploadWork(
|
override fun startPdfGenerateAndUploadWork(
|
||||||
|
|
|
@ -78,8 +78,6 @@ class FilesUploadWorker(
|
||||||
private val fileUploaderDelegate = FileUploaderDelegate()
|
private val fileUploaderDelegate = FileUploaderDelegate()
|
||||||
private var currentUploadFileOperation: UploadFileOperation? = null
|
private var currentUploadFileOperation: UploadFileOperation? = null
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
override fun doWork(): Result {
|
override fun doWork(): Result {
|
||||||
val accountName = inputData.getString(ACCOUNT)
|
val accountName = inputData.getString(ACCOUNT)
|
||||||
if (accountName.isNullOrEmpty()) {
|
if (accountName.isNullOrEmpty()) {
|
||||||
|
@ -108,7 +106,7 @@ class FilesUploadWorker(
|
||||||
val user = userAccountManager.getUser(accountName)
|
val user = userAccountManager.getUser(accountName)
|
||||||
|
|
||||||
for (upload in uploads) {
|
for (upload in uploads) {
|
||||||
if (isStopped){
|
if (isStopped) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// create upload file operation
|
// create upload file operation
|
||||||
|
@ -190,7 +188,6 @@ class FilesUploadWorker(
|
||||||
// cancel notification
|
// cancel notification
|
||||||
notificationManager.cancel(FOREGROUND_SERVICE_ID)
|
notificationManager.cancel(FOREGROUND_SERVICE_ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return uploadResult
|
return uploadResult
|
||||||
|
|
|
@ -70,7 +70,7 @@ class FilesUploadHelper {
|
||||||
backgroundJobManager.startFilesUploadJob(user)
|
backgroundJobManager.startFilesUploadJob(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cancelFileUpload(remotePath: String, user: User){
|
fun cancelFileUpload(remotePath: String, user: User) {
|
||||||
// need to update now table in mUploadsStorageManager,
|
// need to update now table in mUploadsStorageManager,
|
||||||
// since the operation will not get to be run by FileUploader#uploadFile
|
// since the operation will not get to be run by FileUploader#uploadFile
|
||||||
uploadsStorageManager.removeUpload(user.accountName, remotePath)
|
uploadsStorageManager.removeUpload(user.accountName, remotePath)
|
||||||
|
@ -78,15 +78,11 @@ class FilesUploadHelper {
|
||||||
restartUploadJob(user)
|
restartUploadJob(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun restartUploadJob(user: User){
|
fun restartUploadJob(user: User) {
|
||||||
backgroundJobManager.cancelFilesUploadJob(user)
|
backgroundJobManager.cancelFilesUploadJob(user)
|
||||||
backgroundJobManager.startFilesUploadJob(user)
|
backgroundJobManager.startFilesUploadJob(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fun uploadUpdatedFile(
|
fun uploadUpdatedFile(
|
||||||
user: User,
|
user: User,
|
||||||
existingFiles: Array<OCFile>,
|
existingFiles: Array<OCFile>,
|
||||||
|
|
Loading…
Reference in a new issue