消息中心遮罩修改
This commit is contained in:
@@ -577,6 +577,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
isfloatBannernet = false;
|
||||
}
|
||||
});
|
||||
//获取指导员账号
|
||||
ConversationIMListManager.get(this).getUserInstructor(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,18 +145,14 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
||||
}
|
||||
}, null);
|
||||
//点击事件
|
||||
politicalInstructor.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
String targetId = ConversationIMListManager.get(mContext).getTargetId();
|
||||
if (!TextUtils.isEmpty(targetId)) {
|
||||
ConversationIMListManager.get(mContext).jumpConversation(mContext, targetId);
|
||||
guide.dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(politicalInstructor, () -> {
|
||||
String targetId = ConversationIMListManager.get(mContext).getTargetId();
|
||||
if (!TextUtils.isEmpty(targetId)) {
|
||||
ConversationIMListManager.get(mContext).jumpConversation(mContext, targetId);
|
||||
guide.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,7 +208,6 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
||||
* 初始化数据
|
||||
*/
|
||||
private void initData() {
|
||||
ConversationIMListManager.get(mContext).getConversationListByPage(false);
|
||||
IMLoginManager.get(mContext).checkInstructor();
|
||||
mProcessResultUtil = new ProcessResultUtil(this);
|
||||
netHandler.post(imUserInfoRunnable);
|
||||
@@ -413,7 +408,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
||||
DialogUitl.showSimpleDialog(mContext, null, getString(R.string.clear_unread_messages), false, new DialogUitl.SimpleCallback3() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog) {
|
||||
ConversationIMListManager.get(mContext).getConversationListByPage(true);
|
||||
// ConversationIMListManager.get(mContext).getConversationListByPage(true);
|
||||
LiveNetManager.get(mContext)
|
||||
.setMessageReadAll(new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
|
||||
@@ -690,7 +690,7 @@ public class MainHttpUtil {
|
||||
}
|
||||
//
|
||||
public static void setMessageReadAll(){
|
||||
HttpClient.getInstance().get("Message.setMessageReadAll","")
|
||||
HttpClient.getInstance().get("User.getUserInstructor","")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
|
||||
@@ -13,8 +13,10 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.activity.PDLIiveChatActivity;
|
||||
@@ -280,8 +282,30 @@ public class ConversationIMListManager {
|
||||
private long timeStamp = 0;
|
||||
|
||||
/**
|
||||
* 获取新手指导员账号
|
||||
* 获取当前指导员ID
|
||||
*/
|
||||
|
||||
public void getUserInstructor(Activity context) {
|
||||
LiveNetManager.get(context)
|
||||
.getUserInstructor(new com.yunbao.common.http.base.HttpCallback<List<VipModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<VipModel> data) {
|
||||
if (data != null && data.size() > 0) {
|
||||
targetId = data.get(0).getAdminId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新手指导员账号(废弃,过时)
|
||||
*/
|
||||
@Deprecated
|
||||
public void getConversationListByPage(boolean clearMessages) {
|
||||
RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback<List<Conversation>>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user