mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
As commit ab4fca5e does, this commit fixed the repeated notification
alarms in DeleteTask.class.
Since progress indication in notification can be cleared by calling
.setProgress(0,0,false) on notificationBuilder(As shown in DeleteTask.class).
This commit also refactored notification related code in UploadService.class.
Make progress and failed notification uses the same notificationBuilder.
This commit is contained in:
parent
52724b8be0
commit
62c14ecb66
2 changed files with 19 additions and 28 deletions
|
|
@ -55,7 +55,8 @@ public class DeleteTask extends AsyncTask<Void, Integer, Boolean> {
|
|||
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
notificationBuilder = new NotificationCompat.Builder(
|
||||
context,
|
||||
CommonsApplication.NOTIFICATION_CHANNEL_ID_ALL);
|
||||
CommonsApplication.NOTIFICATION_CHANNEL_ID_ALL)
|
||||
.setOnlyAlertOnce(true);
|
||||
Toast toast = new Toast(context);
|
||||
toast.setGravity(Gravity.CENTER,0,0);
|
||||
toast = Toast.makeText(context,"Trying to nominate "+media.getDisplayTitle()+ " for deletion",Toast.LENGTH_SHORT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue