update
This commit is contained in:
@@ -20,6 +20,7 @@ import com.shayu.onetoone.activity.fragments.DynamicFragment;
|
||||
import com.shayu.onetoone.activity.fragments.FriendsFragment;
|
||||
import com.shayu.onetoone.activity.fragments.MessageFragment;
|
||||
import com.shayu.onetoone.activity.fragments.MyFragment;
|
||||
import com.shayu.onetoone.activity.message.ChatActivity;
|
||||
import com.shayu.onetoone.bean.JoinAnchorBean;
|
||||
import com.shayu.onetoone.bean.MatchingItemSizeBean;
|
||||
import com.shayu.onetoone.bean.OfficialNoticeBean;
|
||||
@@ -127,7 +128,6 @@ public class MainActivity extends AbsOTOActivity {
|
||||
}
|
||||
});
|
||||
CallClientManager.getManager();
|
||||
initFirstLoginTips();
|
||||
}
|
||||
|
||||
private void initFirstLoginTips() {
|
||||
@@ -141,16 +141,18 @@ public class MainActivity extends AbsOTOActivity {
|
||||
boolean isShow = true;
|
||||
if (data.getLogin() == 0) {
|
||||
isHome = true;
|
||||
} else if (data.getChat() == 0) {
|
||||
}
|
||||
if (data.getChat() == 0) {
|
||||
isMan = IMLoginManager.get(mContext).getUserInfo().getSex() == 1;
|
||||
} else {
|
||||
}
|
||||
if (!isHome && data.getChat() != 0) {
|
||||
isShow = false;
|
||||
}
|
||||
Bus.get().post(new HomeBusEvent(HomeBusEvent.TYPE_UPDATE_MATCHING, data.getNum()));
|
||||
if (isShow) {
|
||||
new FirstTipsDialog(mContext)
|
||||
.setHome(isMan)
|
||||
.setMan(isHome)
|
||||
.setHome(isHome)
|
||||
.setMan(isMan)
|
||||
.setOnItemClickListener(new OnItemClickListener<FirstTipsDialog>() {
|
||||
@Override
|
||||
public void onItemClick(FirstTipsDialog dialog, int position) {
|
||||
@@ -160,6 +162,7 @@ public class MainActivity extends AbsOTOActivity {
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
super.onSuccess(token, bean);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("type", ChatActivity.CALL_CHAT_TYPE_MATCH);
|
||||
bundle.putString("data", JSONObject.toJSONString(bean));
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MATCHING, bundle);
|
||||
}
|
||||
@@ -170,8 +173,10 @@ public class MainActivity extends AbsOTOActivity {
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MATCHING);
|
||||
}
|
||||
});
|
||||
OTONetManager.getInstance(mContext).setFiled("is_login","1",null);
|
||||
} else {
|
||||
viewPager.setCurrentItem(2);
|
||||
OTONetManager.getInstance(mContext).setFiled("is_chat","1",null);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user