Skip to content

Commit

Permalink
use shorter declarative form for default progress actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gotev committed Feb 9, 2020
1 parent cdc00a7 commit d08f106
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,15 @@ object UploadServiceConfig {
isRingToneEnabled = true,
progress = UploadNotificationStatusConfig(
title = title,
message = "Uploading at ${Placeholder.UploadRate} (${Placeholder.Progress})"
).apply {
actions.add(
message = "Uploading at ${Placeholder.UploadRate} (${Placeholder.Progress})",
actions = arrayListOf(
UploadNotificationAction(
icon = android.R.drawable.ic_menu_close_clear_cancel,
title = "Cancel",
intent = context.getCancelUploadIntent(uploadId)
)
)
},
),
success = UploadNotificationStatusConfig(
title = title,
message = "Upload completed successfully in ${Placeholder.ElapsedTime}"
Expand Down

0 comments on commit d08f106

Please sign in to comment.