Change upload icon

This commit is contained in:
J-Jamet
2020-08-24 22:32:05 +02:00
parent 0b78731bb3
commit 65e404374f
2 changed files with 9 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ class AttachmentFileNotificationService: LockNotificationService() {
return START_REDELIVER_INTENT
}
@Synchronized
fun checkCurrentAttachmentProgress() {
attachmentNotificationList.forEach { attachmentNotification ->
mActionTaskListeners.forEach { actionListener ->
@@ -135,6 +136,7 @@ class AttachmentFileNotificationService: LockNotificationService() {
}
}
@Synchronized
fun removeAttachmentAction(entryAttachment: EntryAttachmentState) {
attachmentNotificationList.firstOrNull {
it.entryAttachmentState == entryAttachment
@@ -164,12 +166,13 @@ class AttachmentFileNotificationService: LockNotificationService() {
val fileName = DocumentFile.fromSingleUri(this, attachmentNotification.uri)?.name ?: ""
val builder = buildNewNotification().apply {
setSmallIcon(R.drawable.ic_file_download_white_24dp)
when (attachmentNotification.streamDirection) {
AttachmentFileAction.StreamDirection.UPLOAD -> {
setSmallIcon(R.drawable.ic_file_upload_white_24dp)
setContentTitle(getString(R.string.upload_attachment, fileName))
}
AttachmentFileAction.StreamDirection.DOWNLOAD -> {
setSmallIcon(R.drawable.ic_file_download_white_24dp)
setContentTitle(getString(R.string.download_attachment, fileName))
}
}

View File

@@ -0,0 +1,5 @@
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_file_download_white_24dp"
android:fromDegrees="180"
android:toDegrees="180"
android:visible="true" />