[Modify]消息頁面修改
This commit is contained in:
@@ -777,7 +777,7 @@ public class MessageListPanelEx {
|
|||||||
|
|
||||||
private class MessageLoader implements BaseFetchLoadAdapter.RequestLoadMoreListener, BaseFetchLoadAdapter.RequestFetchMoreListener {
|
private class MessageLoader implements BaseFetchLoadAdapter.RequestLoadMoreListener, BaseFetchLoadAdapter.RequestFetchMoreListener {
|
||||||
|
|
||||||
private int loadMsgCount = NimUIKitImpl.getOptions().messageCountLoadOnce;
|
private int loadMsgCount = getLoadMsgCount();
|
||||||
|
|
||||||
private QueryDirectionEnum direction = null;
|
private QueryDirectionEnum direction = null;
|
||||||
|
|
||||||
@@ -855,6 +855,13 @@ public class MessageListPanelEx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getLoadMsgCount(){
|
||||||
|
if(TextUtils.isEmpty(recordId)){
|
||||||
|
return NimUIKitImpl.getOptions().messageCountLoadOnce;
|
||||||
|
}else {
|
||||||
|
return 50;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 私聊聊天信息数(发起私聊限制需要用到)
|
* 私聊聊天信息数(发起私聊限制需要用到)
|
||||||
@@ -939,6 +946,7 @@ public class MessageListPanelEx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
firstLoad = false;
|
firstLoad = false;
|
||||||
|
loadMsgCount = NimUIKitImpl.getOptions().messageCountLoadOnce;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doScrollToPosition() {
|
private void doScrollToPosition() {
|
||||||
|
@@ -227,11 +227,11 @@ public class HallMsgViewHolder extends MsgViewHolderBase {
|
|||||||
});
|
});
|
||||||
stvReject.setOnClickListener(view -> {
|
stvReject.setOnClickListener(view -> {
|
||||||
RefuseApplyDialog dialog = new RefuseApplyDialog(context);
|
RefuseApplyDialog dialog = new RefuseApplyDialog(context);
|
||||||
if(info.getUrl().contains("hall/dealInvite")){
|
if (info.getUrl().contains("hall/dealInvite")) {
|
||||||
dialog.setIsInvite(false);
|
dialog.setIsInvite(false);
|
||||||
dialog.setTitleMsg(context.getString(R.string.refuse_invite));
|
dialog.setTitleMsg(context.getString(R.string.refuse_invite));
|
||||||
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_room_join_apply));
|
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_room_join_apply));
|
||||||
}else {
|
} else {
|
||||||
dialog.setIsInvite(true);
|
dialog.setIsInvite(true);
|
||||||
dialog.setTitleMsg(context.getString(R.string.refuse_apply));
|
dialog.setTitleMsg(context.getString(R.string.refuse_apply));
|
||||||
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_user_join_room));
|
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_user_join_room));
|
||||||
@@ -240,9 +240,9 @@ public class HallMsgViewHolder extends MsgViewHolderBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onOk(Boolean isCheck) {
|
public void onOk(Boolean isCheck) {
|
||||||
RefuseApplyDialog.OnActionListener.super.onOk(isCheck);
|
RefuseApplyDialog.OnActionListener.super.onOk(isCheck);
|
||||||
if(isCheck) {
|
if (isCheck) {
|
||||||
handleApply(info, second, -1);
|
handleApply(info, second, -1);
|
||||||
}else {
|
} else {
|
||||||
handleApply(info, second, 0);
|
handleApply(info, second, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -260,6 +260,25 @@ public class HallMsgViewHolder extends MsgViewHolderBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onErrorMsg(String error) {
|
public void onErrorMsg(String error) {
|
||||||
SingleToastUtil.showToast(error);
|
SingleToastUtil.showToast(error);
|
||||||
|
if (error.equals("消息已過期")) {
|
||||||
|
info.setType(HallImMsgInfo.MSG_TYPE_OUT_OF_DATE);
|
||||||
|
setMsgTypeView(info, second);
|
||||||
|
Map<String, Object> localExtension = HallImMsgInfo.convertToMap(info);
|
||||||
|
message.setLocalExtension(localExtension);
|
||||||
|
updateMessageToLocal(info);
|
||||||
|
if (second == CustomAttachment.CUSTOM_MSG_SUB_HALL_MANAGER_INVITE) {
|
||||||
|
EventBus.getDefault().post(new HallInfoChangeEvent());
|
||||||
|
}
|
||||||
|
} else if (error.equals("消息已處理")) {
|
||||||
|
info.setType(HallImMsgInfo.MSG_TYPE_HAS_HANDLE);
|
||||||
|
setMsgTypeView(info, second);
|
||||||
|
Map<String, Object> localExtension = HallImMsgInfo.convertToMap(info);
|
||||||
|
message.setLocalExtension(localExtension);
|
||||||
|
updateMessageToLocal(info);
|
||||||
|
if (second == CustomAttachment.CUSTOM_MSG_SUB_HALL_MANAGER_INVITE) {
|
||||||
|
EventBus.getDefault().post(new HallInfoChangeEvent());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user