mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
remove complexity form notifyResult
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
parent
9cdd22d5c6
commit
5ba3201bc5
1 changed files with 14 additions and 17 deletions
|
@ -271,13 +271,6 @@ class FileUploadWorker(
|
||||||
}
|
}
|
||||||
|
|
||||||
notificationManager.run {
|
notificationManager.run {
|
||||||
val credentialIntent: PendingIntent? = if (uploadResult.code == ResultCode.UNAUTHORIZED) {
|
|
||||||
intents.credentialIntent(uploadFileOperation)
|
|
||||||
} else {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!uploadResult.isSuccess) {
|
|
||||||
val errorMessage = ErrorMessageAdapter.getErrorCauseMessage(
|
val errorMessage = ErrorMessageAdapter.getErrorCauseMessage(
|
||||||
uploadResult,
|
uploadResult,
|
||||||
uploadFileOperation,
|
uploadFileOperation,
|
||||||
|
@ -290,11 +283,15 @@ class FileUploadWorker(
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
val credentialIntent: PendingIntent? = if (uploadResult.code == ResultCode.UNAUTHORIZED) {
|
||||||
|
intents.credentialIntent(uploadFileOperation)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
notifyForFailedResult(uploadResult.code, conflictResolveIntent, credentialIntent, errorMessage)
|
notifyForFailedResult(uploadResult.code, conflictResolveIntent, credentialIntent, errorMessage)
|
||||||
showNewNotification(uploadFileOperation)
|
showNewNotification(uploadFileOperation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTransferProgress(
|
override fun onTransferProgress(
|
||||||
progressRate: Long,
|
progressRate: Long,
|
||||||
|
|
Loading…
Reference in a new issue