Skip to content

Commit 1cce8f8

Browse files
committed
Fix screenshot deletion query; 3.1.4
1 parent d66eea2 commit 1cce8f8

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.idea/workspace.xml

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ android {
2929
def MIN_SDK_VERSION = 23
3030
def COMPILE_SDK_VERSION = 33
3131

32-
def VERSION_CODE = 22
33-
def VERSION_NAME = '3.1.3'
32+
def VERSION_CODE = 23
33+
def VERSION_NAME = '3.1.4'
3434

3535
compileSdkVersion COMPILE_SDK_VERSION
3636
defaultConfig {

app/src/main/java/com/autocrop/activities/examination/ExaminationActivityViewModel.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.content.ContentUris
44
import android.content.Context
55
import android.net.Uri
66
import android.os.Build
7+
import android.provider.MediaStore
78
import androidx.lifecycle.ViewModel
89
import com.autocrop.dataclasses.CropBundle
910
import com.autocrop.dataclasses.Screenshot
@@ -69,17 +70,17 @@ class ExaminationActivityViewModel(private val validSaveDirDocumentUri: Uri?, va
6970
private fun addScreenshotDeletionInquiryUri(deleteScreenshot: Boolean,
7071
screenshot: Screenshot): Boolean{
7172
if (deleteScreenshot)
72-
imageDeletionInquiryUri(screenshot.uri, screenshot.mediaStoreId)?.let {
73+
imageDeletionInquiryUri(screenshot.mediaStoreId)?.let {
7374
screenshotDeletionInquiryUris.add(it)
7475
return true
7576
}
7677
return false
7778
}
7879

79-
private fun imageDeletionInquiryUri(uri: Uri, mediaStoreId: Long): Uri? =
80+
private fun imageDeletionInquiryUri(mediaStoreId: Long): Uri? =
8081
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
8182
ContentUris.withAppendedId(
82-
uri,
83+
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
8384
mediaStoreId
8485
)
8586
.also { Timber.i("Built contentUriWithMediaStoreImagesId: $it") }

0 commit comments

Comments
 (0)