tq: delete from table on deletion
parent
414f6cf5ed
commit
fb911669e6
|
@ -293,7 +293,6 @@ public class TimelineQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete file with media store
|
// Delete file with media store
|
||||||
Uri collection = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
PendingIntent intent = MediaStore.createTrashRequest(mCtx.getContentResolver(), uris, true);
|
PendingIntent intent = MediaStore.createTrashRequest(mCtx.getContentResolver(), uris, true);
|
||||||
deleteIntentLauncher.launch(new IntentSenderRequest.Builder(intent.getIntentSender()).build());
|
deleteIntentLauncher.launch(new IntentSenderRequest.Builder(intent.getIntentSender()).build());
|
||||||
|
@ -313,6 +312,9 @@ public class TimelineQuery {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete from images table
|
||||||
|
mDb.execSQL("DELETE FROM images WHERE local_id IN (" + TextUtils.join(",", ids) + ")");
|
||||||
|
|
||||||
return new JSONObject().put("message", "ok");
|
return new JSONObject().put("message", "ok");
|
||||||
} finally {
|
} finally {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
|
Loading…
Reference in New Issue