mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
UploadWorker.kt: modified property names to camel case to meet ktlint standard
This commit is contained in:
parent
88d853e3fa
commit
564906a791
1 changed files with 10 additions and 10 deletions
|
|
@ -74,9 +74,9 @@ class UploadWorker(
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var fileUtilsWrapper: FileUtilsWrapper
|
lateinit var fileUtilsWrapper: FileUtilsWrapper
|
||||||
|
|
||||||
private val PROCESSING_UPLOADS_NOTIFICATION_TAG = BuildConfig.APPLICATION_ID + " : upload_tag"
|
private val processingUploadsNotificationTag = BuildConfig.APPLICATION_ID + " : upload_tag"
|
||||||
|
|
||||||
private val PROCESSING_UPLOADS_NOTIFICATION_ID = 101
|
private val processingUploadsNotificationId = 101
|
||||||
|
|
||||||
// Attributes of the current-upload notification
|
// Attributes of the current-upload notification
|
||||||
private var currentNotificationID: Int = -1 // lateinit is not allowed with primitives
|
private var currentNotificationID: Int = -1 // lateinit is not allowed with primitives
|
||||||
|
|
@ -85,7 +85,7 @@ class UploadWorker(
|
||||||
|
|
||||||
private val statesToProcess = ArrayList<Int>()
|
private val statesToProcess = ArrayList<Int>()
|
||||||
|
|
||||||
private val STASH_ERROR_CODES =
|
private val stashErrorCodes =
|
||||||
listOf(
|
listOf(
|
||||||
"uploadstash-file-not-found",
|
"uploadstash-file-not-found",
|
||||||
"stashfailed",
|
"stashfailed",
|
||||||
|
|
@ -132,8 +132,8 @@ class UploadWorker(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
notificationManager?.cancel(
|
notificationManager?.cancel(
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_TAG,
|
processingUploadsNotificationTag,
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_ID,
|
processingUploadsNotificationId,
|
||||||
)
|
)
|
||||||
notificationManager?.notify(
|
notificationManager?.notify(
|
||||||
currentNotificationTag,
|
currentNotificationTag,
|
||||||
|
|
@ -216,8 +216,8 @@ class UploadWorker(
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
notificationManager?.notify(
|
notificationManager?.notify(
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_TAG,
|
processingUploadsNotificationTag,
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_ID,
|
processingUploadsNotificationId,
|
||||||
processingUploads.build(),
|
processingUploads.build(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -237,8 +237,8 @@ class UploadWorker(
|
||||||
}
|
}
|
||||||
// Dismiss the global notification
|
// Dismiss the global notification
|
||||||
notificationManager?.cancel(
|
notificationManager?.cancel(
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_TAG,
|
processingUploadsNotificationTag,
|
||||||
PROCESSING_UPLOADS_NOTIFICATION_ID,
|
processingUploadsNotificationId,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// Trigger WorkManager to process any new contributions that may have been added to the queue
|
// Trigger WorkManager to process any new contributions that may have been added to the queue
|
||||||
|
|
@ -397,7 +397,7 @@ class UploadWorker(
|
||||||
showFailedNotification(contribution)
|
showFailedNotification(contribution)
|
||||||
contribution.state = Contribution.STATE_FAILED
|
contribution.state = Contribution.STATE_FAILED
|
||||||
contributionDao.saveSynchronous(contribution)
|
contributionDao.saveSynchronous(contribution)
|
||||||
if (STASH_ERROR_CODES.contains(exception.message)) {
|
if (stashErrorCodes.contains(exception.message)) {
|
||||||
clearChunks(contribution)
|
clearChunks(contribution)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue