From fb911669e6bde5666c72173a0674431f18560041 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Wed, 10 May 2023 13:25:02 -0700 Subject: [PATCH] tq: delete from table on deletion --- app/src/main/java/gallery/memories/service/TimelineQuery.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gallery/memories/service/TimelineQuery.java b/app/src/main/java/gallery/memories/service/TimelineQuery.java index fbf09975..5827d6dc 100644 --- a/app/src/main/java/gallery/memories/service/TimelineQuery.java +++ b/app/src/main/java/gallery/memories/service/TimelineQuery.java @@ -293,7 +293,6 @@ public class TimelineQuery { } // Delete file with media store - Uri collection = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { PendingIntent intent = MediaStore.createTrashRequest(mCtx.getContentResolver(), uris, true); 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"); } finally { synchronized (this) {