From 38d224dba55af3a83990e80a7943ee3e4c5b57db Mon Sep 17 00:00:00 2001 From: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Date: Sat, 29 Jul 2023 07:19:10 +0000 Subject: [PATCH] fix: delete assets permanently deleted instead of trash in android R --- .../photo_manager/core/PhotoManagerDeleteManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManagerDeleteManager.kt b/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManagerDeleteManager.kt index 1dcf6bd5..822a3538 100644 --- a/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManagerDeleteManager.kt +++ b/android/src/main/kotlin/com/fluttercandies/photo_manager/core/PhotoManagerDeleteManager.kt @@ -57,7 +57,7 @@ class PhotoManagerDeleteManager(val context: Context, private var activity: Acti @RequiresApi(Build.VERSION_CODES.R) fun deleteInApi30(uris: List, resultHandler: ResultHandler) { this.androidRHandler = resultHandler - val pendingIntent = MediaStore.createTrashRequest(cr, uris.mapNotNull { it }, true) + val pendingIntent = MediaStore.createDeleteRequest(cr, uris.mapNotNull { it }) activity?.startIntentSenderForResult( pendingIntent.intentSender, androidRDeleteRequestCode,