Skip to content

Commit

Permalink
swipe away failed notification (#3598)
Browse files Browse the repository at this point in the history
  • Loading branch information
318anushka authored Mar 29, 2020
1 parent 38635d0 commit 5c4eea3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ private void uploadContribution(Contribution contribution) {
Timber.d("Before execution!");
curNotification.setContentTitle(getString(R.string.upload_progress_notification_title_start, contribution.getDisplayTitle()))
.setContentText(getResources().getQuantityString(R.plurals.uploads_pending_notification_indicator, toUpload, toUpload))
.setTicker(getString(R.string.upload_progress_notification_title_in_progress, contribution.getDisplayTitle()));
.setTicker(getString(R.string.upload_progress_notification_title_in_progress, contribution.getDisplayTitle()))
.setOngoing(true);
notificationManager
.notify(notificationTag, NOTIFICATION_UPLOAD_IN_PROGRESS, curNotification.build());

Expand Down Expand Up @@ -306,7 +307,8 @@ private void showFailedNotification(Contribution contribution) {
curNotification.setTicker(getString(R.string.upload_failed_notification_title, contribution.getDisplayTitle()))
.setContentTitle(getString(R.string.upload_failed_notification_title, contribution.getDisplayTitle()))
.setContentText(getString(R.string.upload_failed_notification_subtitle))
.setProgress(0, 0, false);
.setProgress(0, 0, false)
.setOngoing(false);
notificationManager.notify(contribution.getLocalUri().toString(), NOTIFICATION_UPLOAD_FAILED, curNotification.build());

contribution.setState(Contribution.STATE_FAILED);
Expand Down

0 comments on commit 5c4eea3

Please sign in to comment.