mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
parent
a261dbb4fb
commit
309a51f46a
1 changed files with 8 additions and 0 deletions
|
|
@ -1,7 +1,10 @@
|
|||
package fr.free.nrw.commons.delete;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationCompat.Builder;
|
||||
|
|
@ -14,6 +17,7 @@ import java.util.Locale;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.Media;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -181,6 +185,10 @@ public class DeleteTask extends AsyncTask<Void, Integer, Boolean> {
|
|||
.setProgress(0,0,false)
|
||||
.setOngoing(false)
|
||||
.setPriority(PRIORITY_HIGH);
|
||||
String urlForDelete = BuildConfig.COMMONS_URL + "/wiki/Commons:Deletion_requests/File:" + media.getFilename();
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW , Uri.parse(urlForDelete));
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(context , 1 , browserIntent , PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
notificationBuilder.setContentIntent(pendingIntent);
|
||||
notificationManager.notify(NOTIFICATION_DELETE, notificationBuilder.build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue