消息中心遮罩修改
This commit is contained in:
parent
7c287e2abf
commit
7281296d8e
@ -10,6 +10,9 @@ public class VipModel extends BaseModel {
|
|||||||
@SerializedName("type")
|
@SerializedName("type")
|
||||||
private String type = "";
|
private String type = "";
|
||||||
|
|
||||||
|
@SerializedName("admin_id")
|
||||||
|
private String adminId;
|
||||||
|
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -18,4 +21,13 @@ public class VipModel extends BaseModel {
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAdminId() {
|
||||||
|
return adminId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VipModel setAdminId(String adminId) {
|
||||||
|
this.adminId = adminId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import com.yunbao.common.bean.NobleTrumpetModel;
|
|||||||
import com.yunbao.common.bean.SearchModel;
|
import com.yunbao.common.bean.SearchModel;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
import com.yunbao.common.bean.SlideInBannerModel;
|
import com.yunbao.common.bean.SlideInBannerModel;
|
||||||
|
import com.yunbao.common.bean.VipModel;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -218,4 +219,10 @@ public interface PDLiveApi {
|
|||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Message.setMessageReadAll")
|
@GET("/api/public/?service=Message.setMessageReadAll")
|
||||||
Observable<ResponseModel<List<String>>> setMessageReadAll();
|
Observable<ResponseModel<List<String>>> setMessageReadAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前用户指导员ID
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=User.getUserInstructor")
|
||||||
|
Observable<ResponseModel<List<VipModel>>> getUserInstructor();
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.yunbao.common.bean.BaseModel;
|
|||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
|
import com.yunbao.common.bean.VipModel;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
|
||||||
@ -172,4 +173,20 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前用户指导员ID
|
||||||
|
*/
|
||||||
|
public void getUserInstructor(HttpCallback<List<VipModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext).getUserInstructor()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
if (callback != null)
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
if (callback != null)
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -577,6 +577,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//获取指导员账号
|
||||||
|
ConversationIMListManager.get(this).getUserInstructor(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,18 +145,14 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
|||||||
}
|
}
|
||||||
}, null);
|
}, null);
|
||||||
//点击事件
|
//点击事件
|
||||||
politicalInstructor.setOnClickListener(new View.OnClickListener() {
|
ViewClicksAntiShake.clicksAntiShake(politicalInstructor, () -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
|
||||||
String targetId = ConversationIMListManager.get(mContext).getTargetId();
|
String targetId = ConversationIMListManager.get(mContext).getTargetId();
|
||||||
if (!TextUtils.isEmpty(targetId)) {
|
if (!TextUtils.isEmpty(targetId)) {
|
||||||
ConversationIMListManager.get(mContext).jumpConversation(mContext, targetId);
|
ConversationIMListManager.get(mContext).jumpConversation(mContext, targetId);
|
||||||
guide.dismiss();
|
guide.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,7 +208,6 @@ public class PDLiveConversationListActivity extends AbsActivity implements View.
|
|||||||
* 初始化数据
|
* 初始化数据
|
||||||
*/
|
*/
|
||||||
private void initData() {
|
private void initData() {
|
||||||
ConversationIMListManager.get(mContext).getConversationListByPage(false);
|
|
||||||
IMLoginManager.get(mContext).checkInstructor();
|
IMLoginManager.get(mContext).checkInstructor();
|
||||||
mProcessResultUtil = new ProcessResultUtil(this);
|
mProcessResultUtil = new ProcessResultUtil(this);
|
||||||
netHandler.post(imUserInfoRunnable);
|
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() {
|
DialogUitl.showSimpleDialog(mContext, null, getString(R.string.clear_unread_messages), false, new DialogUitl.SimpleCallback3() {
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog) {
|
public void onConfirmClick(Dialog dialog) {
|
||||||
ConversationIMListManager.get(mContext).getConversationListByPage(true);
|
// ConversationIMListManager.get(mContext).getConversationListByPage(true);
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.setMessageReadAll(new com.yunbao.common.http.base.HttpCallback<String>() {
|
.setMessageReadAll(new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -690,7 +690,7 @@ public class MainHttpUtil {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
public static void setMessageReadAll(){
|
public static void setMessageReadAll(){
|
||||||
HttpClient.getInstance().get("Message.setMessageReadAll","")
|
HttpClient.getInstance().get("User.getUserInstructor","")
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
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.blankj.utilcode.util.GsonUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
|
import com.yunbao.common.bean.VipModel;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
import com.yunbao.common.manager.InstructorRemarkManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.live.activity.PDLIiveChatActivity;
|
import com.yunbao.live.activity.PDLIiveChatActivity;
|
||||||
@ -280,8 +282,30 @@ public class ConversationIMListManager {
|
|||||||
private long timeStamp = 0;
|
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) {
|
public void getConversationListByPage(boolean clearMessages) {
|
||||||
RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback<List<Conversation>>() {
|
RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback<List<Conversation>>() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user