diff --git a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java index eec5cea55..5676e71fb 100644 --- a/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java +++ b/common/src/main/java/com/yunbao/common/bean/IMLoginModel.java @@ -257,6 +257,8 @@ public class IMLoginModel extends BaseModel { private String guardType = ""; @SerializedName("isAttention") private int attention; + @SerializedName("type") + private String type; public int getAttention() { return attention; @@ -270,6 +272,14 @@ public class IMLoginModel extends BaseModel { return createTime; } + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + public IMLoginModel setCreateTime(String createTime) { this.createTime = createTime; return this; diff --git a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java index 760011933..797d279e2 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java @@ -108,7 +108,7 @@ public class MessageUserInfoBean extends BaseModel{ @SerializedName("open_off") private int openOff;//接单设置 1开启 2关闭 @SerializedName("rong_online") - private int rongOnline; + private int rongOnline;//0 在线 非0 其他 public void setOpenOff(int openOff) { this.openOff = openOff; diff --git a/common/src/main/java/com/yunbao/common/dialog/MessageLongClickPopuwindow.java b/common/src/main/java/com/yunbao/common/dialog/MessageLongClickPopuwindow.java index 581d16e42..f0063489f 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageLongClickPopuwindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageLongClickPopuwindow.java @@ -52,14 +52,14 @@ public class MessageLongClickPopuwindow implements View.OnClickListener { Log.e("MessageLongClick ", "currentTimeMillis:" + System.currentTimeMillis()); Log.e("MessageLongClick ", "秒:" + ((System.currentTimeMillis() - sentTime) / 1000)); //超过俩分钟无法撤回 - if (((System.currentTimeMillis() - sentTime) / 1000) > 120) { + /* if (((System.currentTimeMillis() - sentTime) / 1000) > 120) { withdrawLinear.setVisibility(View.GONE); } //只可以撤回自己的消息 IMLoginModel model = IMLoginManager.get(mContext).getUserInfo(); if (!message.getSenderUserId().equals(String.valueOf(model.getId()))) { withdrawLinear.setVisibility(View.GONE); - } + }*/ //非文字信息无法复制 if (!message.getObjectName().equals("RC:TxtMsg")) { copyLinear.setVisibility(View.GONE); @@ -106,7 +106,8 @@ public class MessageLongClickPopuwindow implements View.OnClickListener { copyMethod(); popupWindow.dismiss(); } else if (id == R.id.withdraw_linear) {//撤回 - withdrawMethod(); + // withdrawMethod(); + delete(); popupWindow.dismiss(); } else if (id == R.id.quote_linear) {//引用 List messageItemLongClickActionList = MessageItemLongClickActionManager.getInstance().getMessageItemLongClickActions(); @@ -115,6 +116,20 @@ public class MessageLongClickPopuwindow implements View.OnClickListener { } + private void delete() { + IMCenter.getInstance().deleteMessages(message.getConversationType(), message.getTargetId(), new int[]{message.getMessageId()}, new RongIMClient.ResultCallback() { + @Override + public void onSuccess(Boolean aBoolean) { + + } + + @Override + public void onError(RongIMClient.ErrorCode e) { + + } + }); + } + private void copyMethod() { //文字消息支持复制 if (message.getContent() instanceof TextMessage) { diff --git a/common/src/main/res/layout/view_message_long_click.xml b/common/src/main/res/layout/view_message_long_click.xml index 63b130b66..19566ecc3 100644 --- a/common/src/main/res/layout/view_message_long_click.xml +++ b/common/src/main/res/layout/view_message_long_click.xml @@ -10,24 +10,25 @@ @@ -58,12 +58,12 @@ + android:orientation="vertical" + android:padding="5dp" + android:visibility="gone"> + + + + + diff --git a/main/src/main/res/mipmap-b+en+us/ic_chat_auth.png b/main/src/main/res/mipmap-b+en+us/ic_chat_auth.png new file mode 100644 index 000000000..f99da0624 Binary files /dev/null and b/main/src/main/res/mipmap-b+en+us/ic_chat_auth.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/ic_chat_auth.png b/main/src/main/res/mipmap-xxhdpi/ic_chat_auth.png new file mode 100644 index 000000000..8644015f2 Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/ic_chat_auth.png differ