tq: delete from table on deletion

pull/653/merge
Varun Patil 2023-05-10 13:25:02 -07:00
parent 414f6cf5ed
commit fb911669e6
1 changed files with 3 additions and 1 deletions

View File

@ -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) {