@@ -31,8 +31,8 @@ import com.w2sv.cropbundle.io.extensions.queryMediaStoreData
3131import com.w2sv.cropbundle.io.getDeleteRequestUri
3232import com.w2sv.cropbundle.io.utils.systemScreenshotsDirectory
3333import com.w2sv.kotlinutils.dateFromUnixTimestamp
34+ import com.w2sv.kotlinutils.extensions.getNextTriple
3435import com.w2sv.kotlinutils.timeDelta
35- import com.w2sv.kotlinutils.tripleFromIterable
3636import com.w2sv.screenshotlistening.ScreenshotListener.OnCancelledFromNotificationListener.Companion.ACTION_NOTIFY_ON_SCREENSHOT_LISTENER_CANCELLED_LISTENERS
3737import com.w2sv.screenshotlistening.notifications.AppNotificationChannel
3838import com.w2sv.screenshotlistening.notifications.NotificationGroup
@@ -445,16 +445,16 @@ private class ScreenshotObserver(
445445
446446 private fun Uri.isNewScreenshot (): Boolean? =
447447 try {
448- val (absolutePath, fileName, dateAdded) = tripleFromIterable(
449- contentResolver.queryMediaStoreData(
450- this ,
451- arrayOf(
452- MediaStore .Images .Media .DISPLAY_NAME ,
453- MediaStore .Images .Media .DATA , // e.g. /storage/emulated/0/Pictures/Screenshots/.pending-1665749333-Screenshot_20221007-140853687.png
454- MediaStore .Images .Media .DATE_ADDED
455- )
448+ val (absolutePath, fileName, dateAdded) = contentResolver.queryMediaStoreData(
449+ this ,
450+ arrayOf(
451+ MediaStore .Images .Media .DISPLAY_NAME ,
452+ MediaStore .Images .Media .DATA , // e.g. /storage/emulated/0/Pictures/Screenshots/.pending-1665749333-Screenshot_20221007-140853687.png
453+ MediaStore .Images .Media .DATE_ADDED
456454 )
457455 )
456+ .iterator()
457+ .getNextTriple()
458458
459459 ! fileName.contains(CROP_FILE_ADDENDUM ) && // exclude produced AutoCrop's
460460 timeDelta( // exclude files having already been on the file system and which were only triggered, due to a change of their metadata
0 commit comments