Skip to content

Commit 81bedaf

Browse files
committed
fix:显示发送缩略图
fix:显示发送缩略图
1 parent e37daf6 commit 81bedaf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

android/src/main/java/com/netease/im/ReactCache.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,13 @@ public static WritableMap createMessage(IMMessage item) {
740740
WritableMap imageObj = Arguments.createMap();
741741
if (attachment instanceof ImageAttachment) {
742742
ImageAttachment imageAttachment = (ImageAttachment) attachment;
743-
imageObj.putString("thumbPath", imageAttachment.getThumbPathForSave());
744-
imageObj.putString("thumbPath2", imageAttachment.getThumbPath());
743+
if (item.getDirect() == MsgDirectionEnum.Out) {
744+
imageObj.putString("thumbPath", imageAttachment.getPathForSave());
745+
imageObj.putString("thumbPath2", imageAttachment.getPath());
746+
} else {
747+
imageObj.putString("thumbPath", imageAttachment.getThumbPathForSave());
748+
imageObj.putString("thumbPath2", imageAttachment.getThumbPath());
749+
}
745750
imageObj.putString("path", imageAttachment.getPathForSave());
746751
imageObj.putString("path2", imageAttachment.getPath());
747752
imageObj.putString("url", imageAttachment.getUrl());

0 commit comments

Comments
 (0)