Skip to content

Commit

Permalink
fix folder-download/upload notification success message
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Feb 11, 2024
1 parent a8b5f36 commit 2b1bfb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class DownloadWorkerNotification(var context: Context) : WorkerNotification(cont
override fun generateSuccessMessage(statusObject: StatusObject, fileItem: FileItem): String {

val transfers = statusObject.getTotalTransfers()
val message = if (transfers <= 1) {
statusObject.getTotalTransfers().toString()
val message = if (transfers <= 1 && !fileItem.isDir) {
statusObject.getTransfers().toString()
} else {
fileItem.name
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class UploadWorkerNotification(var context: Context) : WorkerNotification(contex

override fun generateSuccessMessage(statusObject: StatusObject, fileItem: FileItem): String {
val transfers = statusObject.getTotalTransfers()
val message = if (transfers <= 1) {
statusObject.getTotalTransfers().toString()
val message = if (transfers <= 1 && !fileItem.isDir) {
statusObject.getTransfers().toString()
} else {
fileItem.name
}
Expand Down

0 comments on commit 2b1bfb5

Please sign in to comment.