11111
This commit is contained in:
@@ -68,6 +68,7 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
||||
* 清除相关信息
|
||||
*/
|
||||
public void removeNoviceInstructor() {
|
||||
model = null;
|
||||
deleteByKey(KEY_NOVICE_INSTRUCTOR);
|
||||
}
|
||||
|
||||
@@ -75,9 +76,8 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
||||
* 请求接口获取是否展示
|
||||
*/
|
||||
public void getNetNoviceInstructor() {
|
||||
if (null != model) {
|
||||
if (model != null)
|
||||
netHandler.post(instructorOperationRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,6 +87,7 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
//展示指引弹窗
|
||||
EventBus.getDefault().post(new NoviceInstructorEvent().setShowHomeIcon(true));
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.yunbao.common.event.MessageIMEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -83,7 +84,7 @@ public class MessageIMManager {
|
||||
* 获取系统消息(有未读数展示红点)
|
||||
*/
|
||||
public void getSystemMessages() {
|
||||
systemNumber=0;
|
||||
systemNumber = 0;
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
|
||||
.params("uid", userInfo.getId())
|
||||
@@ -103,10 +104,10 @@ public class MessageIMManager {
|
||||
//未读消息不为空并且大于0
|
||||
try {
|
||||
if (!TextUtils.isEmpty(number) && Integer.parseInt(number) > 0) {
|
||||
systemNumber = Integer.parseInt(number)+systemNumber;
|
||||
systemNumber = Integer.parseInt(number) + systemNumber;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
systemNumber =systemNumber+ 0;
|
||||
systemNumber = systemNumber + 0;
|
||||
}
|
||||
}
|
||||
//发送通知
|
||||
@@ -145,7 +146,7 @@ public class MessageIMManager {
|
||||
* 获取系统消息(有未读数展示红点)
|
||||
*/
|
||||
public void getSystemMessages(SystemMessagesHttpCallback callback) {
|
||||
systemNumber=0;
|
||||
systemNumber = 0;
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
|
||||
.params("uid", userInfo.getId())
|
||||
@@ -168,10 +169,10 @@ public class MessageIMManager {
|
||||
//未读消息不为空并且大于0
|
||||
try {
|
||||
if (!TextUtils.isEmpty(number) && Integer.parseInt(number) > 0) {
|
||||
systemNumber = Integer.parseInt(number)+systemNumber;
|
||||
systemNumber = Integer.parseInt(number) + systemNumber;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
systemNumber = systemNumber+0;
|
||||
systemNumber = systemNumber + 0;
|
||||
}
|
||||
}
|
||||
//发送通知
|
||||
@@ -207,8 +208,15 @@ public class MessageIMManager {
|
||||
*/
|
||||
private ConversationClickListener listener = new ConversationClickListener() {
|
||||
@Override
|
||||
public boolean onUserPortraitClick(Context context, Conversation.ConversationType conversationType, UserInfo userInfo, String s) {
|
||||
return false;
|
||||
public boolean onUserPortraitClick(Context context, Conversation.ConversationType conversationType, UserInfo userInfo, String targetId) {
|
||||
IMLoginModel model = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class);
|
||||
long userId = IMLoginManager.get(context).getUserInfo().getId();
|
||||
if (!TextUtils.equals(model.getIsAdmin(), "1") && userId != model.getId()) {
|
||||
RouteUtil.forwardUserHome(mContext, userInfo.getUserId(), 0);
|
||||
} else if (userId == model.getId()) {
|
||||
RouteUtil.forwardUserHome(mContext, userInfo.getUserId(), 2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,17 +57,6 @@ public class RouteUtil {
|
||||
*/
|
||||
public static void forwardUserHome(Context context, String toUid, boolean fromLiveRoom, String fromLiveUid, int intoIndex) {
|
||||
Constants.myIntoIndex = 2;
|
||||
// if (intoIndex == 2) {
|
||||
// ARouter.getInstance().build(PATH_USER_HOME)
|
||||
// .withString(Constants.TO_UID, toUid)
|
||||
// .withBoolean(Constants.FROM_LIVE_ROOM, fromLiveRoom)
|
||||
// .withString(Constants.LIVE_UID, fromLiveUid)
|
||||
// .navigation();
|
||||
|
||||
// WebViewActivity.forward(context, HtmlConfig.PERSONAL + "?touid=" + toUid + "&&isHomePage=1" + "&&fromType=0");
|
||||
// } else {
|
||||
// WebViewActivity.forward(context, HtmlConfig.PERSONAL + "?touid=" + toUid + "&&isHomePage=1" + "&&fromType=0");
|
||||
// }
|
||||
forwardMainUserHome(context, toUid, fromLiveRoom, fromLiveUid, intoIndex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user