use of com.avos.avoscloud.im.v2.AVIMException in project ride-read-android by Ride-Read.
the class ChatSingleActivity method onResendMsg.
/**
* 重新发送已经发送失败的消息
*/
@Subscribe(threadMode = MAIN)
public void onResendMsg(ImTypeMsgResendEvent event) {
if (null != mImConversation && null != event) {
if (AVIMMessage.AVIMMessageStatus.AVIMMessageStatusFailed == event.message.getMessageStatus() && mImConversation.getConversationId().equals(event.message.getConversationId())) {
mImConversation.sendMessage(event.message, new AVIMConversationCallback() {
@Override
public void done(AVIMException e) {
mMsgAdapter.notifyDataSetChanged();
}
});
mMsgAdapter.notifyDataSetChanged();
}
}
}
Aggregations