|
|
@@ -54,12 +54,12 @@ abstract class SelectImageLifecycleObserver(
|
|
|
mediaType = it.mediaType
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
|
if (mediaType != MediaType.IMAGE) {
|
|
|
- onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos)
|
|
|
+ onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos,it.fromPosition)
|
|
|
return@register
|
|
|
}
|
|
|
|
|
|
if (filePath.isNullOrEmpty() || clipParamData == null) {
|
|
|
- onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos)
|
|
|
+ onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos,it.fromPosition)
|
|
|
return@register
|
|
|
}
|
|
|
|
|
|
@@ -67,7 +67,7 @@ abstract class SelectImageLifecycleObserver(
|
|
|
val outputFilePath = outputFile.absolutePath
|
|
|
clipImageObserver.launch(filePath, outputFilePath, clipParamData)
|
|
|
} else {
|
|
|
- onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos)
|
|
|
+ onResult(source, resultCode, filePath, uri, mediaType, it.mediaInfos,it.fromPosition)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -79,7 +79,8 @@ abstract class SelectImageLifecycleObserver(
|
|
|
gifOpt: Boolean? = false,
|
|
|
mesTip: MesTipData? = null,
|
|
|
maxNum: Int = 1,
|
|
|
- coverExpireTime: Long = 0L
|
|
|
+ coverExpireTime: Long = 0L,
|
|
|
+ fromPosition: Int? = null
|
|
|
) {
|
|
|
launcher.launch(SelectImageRequest(maxNum, source, clipParamData, mediaType, gifOpt, mesTip, coverExpireTime))
|
|
|
}
|
|
|
@@ -90,7 +91,8 @@ abstract class SelectImageLifecycleObserver(
|
|
|
path: String?,
|
|
|
uri: String?,
|
|
|
mediaType: MediaType = MediaType.IMAGE,
|
|
|
- mediaInfos: List<LocalMedia>? = null
|
|
|
+ mediaInfos: List<LocalMedia>? = null,
|
|
|
+ fromPosition: Int? = null
|
|
|
)
|
|
|
|
|
|
override fun onDestroy(owner: LifecycleOwner) {
|