wechat image share

This commit is contained in:
luorui
2020-11-11 18:32:09 +08:00
parent 4f654846bd
commit c6aee087b7

View File

@ -134,7 +134,7 @@ internal interface FluwxShareHandler : CoroutineScope {
sourceByteArray.isEmpty() -> {
WXImageObject()
}
sourceByteArray.size > 500 * 1024 -> {
else -> {
WXImageObject().apply {
if (supportFileProvider && targetHigherThanN) {
setImagePath(getFileContentUri(sourceByteArray.toCacheFile(context, sourceImage.suffix)))
@ -147,9 +147,6 @@ internal interface FluwxShareHandler : CoroutineScope {
}
}
}
else -> {
WXImageObject(sourceByteArray)
}
}
val msg = WXMediaMessage()
msg.mediaObject = imageObject