处理冲突
This commit is contained in:
parent
9c2d488764
commit
4dbcd36f56
@ -523,56 +523,6 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*String url = bean.getHref();
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
switch (bean.getId()) {
|
||||
case 1:
|
||||
//forwardProfit();
|
||||
break;
|
||||
case 2:
|
||||
//forwardCoin();
|
||||
break;
|
||||
case 13:
|
||||
//forwardSetting();
|
||||
break;
|
||||
case 19:
|
||||
//forwardMyVideo();
|
||||
break;
|
||||
case 20:
|
||||
//forwardRoomManage();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//21 在线客服
|
||||
Log.i("tag", bean.getId() + "");
|
||||
if (bean.getId() == 8) {//三级分销
|
||||
// forward(mContext, bean.getName(), url);
|
||||
} else {
|
||||
if (bean.getId() == 31) {
|
||||
//跳转网页版粉丝徽章
|
||||
// WebViewActivityMedal.forward(mContext, url);
|
||||
} else if (bean.getId() == 5) {
|
||||
Constants.isTitle = true;
|
||||
// ZhuangBanActivity.forward(mContext, CommonAppConfig.HOST + "/h5/Personality.html");
|
||||
} else if (bean.getId() == 23) { //獎勵中心
|
||||
Log.i("tsa", url);
|
||||
// RewardActivity.forward(mContext, url);
|
||||
} else if (bean.getId() == 4) {
|
||||
// url = HtmlConfig.SHOP + "?t=" + Math.random() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0");
|
||||
// WebViewActivity.forward(mContext, url, false);
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MY_ARN);
|
||||
} else if (bean.getId() == 3) {//我的等级
|
||||
Constants.myIntoIndex = 2;
|
||||
Constants.isTitle = false;
|
||||
// ZhuangBanActivity.forward(mContext, url);
|
||||
} else {
|
||||
WebViewActivity.forward(mContext, url, false);
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
@ -612,49 +562,6 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑个人资料
|
||||
*/
|
||||
private void forwardEditProfile() {
|
||||
// mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的关注
|
||||
*/
|
||||
private void forwardFollow() {
|
||||
// FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的粉丝
|
||||
*/
|
||||
private void forwardFans() {
|
||||
// FansActivity.forward(mContext, CommonAppConfig.getInstance().getUid());
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播记录
|
||||
*/
|
||||
private void forwardLiveRecord() {
|
||||
// LiveRecordActivity.forward(mContext, CommonAppConfig.getInstance().getUserBean());
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的收益
|
||||
*/
|
||||
private void forwardProfit() {
|
||||
// mContext.startActivity(new Intent(mContext, MyProfitActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的钻石
|
||||
*/
|
||||
private void forwardCoin() {
|
||||
RouteUtil.forwardMyCoin(mContext);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置
|
||||
*/
|
||||
@ -662,21 +569,6 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
mContext.startActivity(new Intent(mContext, SettingActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的视频
|
||||
*/
|
||||
private void forwardMyVideo() {
|
||||
// mContext.startActivity(new Intent(mContext, MyVideoActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间管理
|
||||
*/
|
||||
private void forwardRoomManage() {
|
||||
// mContext.startActivity(new Intent(mContext, RoomManageActivity.class));
|
||||
}
|
||||
|
||||
|
||||
public static List<SlideModel> mBannerList = new ArrayList<>();
|
||||
|
||||
private void showBanner() {
|
||||
|
@ -10,18 +10,23 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.BaseFragment;
|
||||
import com.shayu.onetoone.adapter.HomeRankListAdapter;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.HomeRankBean;
|
||||
import com.shayu.onetoone.listener.OnAppbarListener;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -208,30 +213,12 @@ public class HomeRankFragment extends BaseFragment {
|
||||
switch (position) {
|
||||
case 0:
|
||||
svga1.setImageResource(R.mipmap.ic_home_rank_top_1);
|
||||
mBtnFollow1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
follow(user, mBtnFollow1);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
svga2.setImageResource(R.mipmap.ic_home_rank_top_2);
|
||||
mBtnFollow2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
follow(user, mBtnFollow2);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
svga3.setImageResource(R.mipmap.ic_home_rank_top_3);
|
||||
mBtnFollow3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
follow(user, mBtnFollow3);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
ImgLoader.display(mContext, user.getAvatar(), getItem(position, mAvatar1, mAvatar2, mAvatar3));
|
||||
|
@ -25,7 +25,7 @@ import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.UserAvatarPopup;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
@ -54,6 +54,8 @@ import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.CompleteInformationPopup;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -115,14 +117,14 @@ public class EditProfileActivity extends AbsActivity {
|
||||
mSex = (TextView) findViewById(R.id.sex);
|
||||
mCity = (TextView) findViewById(R.id.city);
|
||||
tv_bind_phone = (TextView) findViewById(R.id.tv_bind_phone);
|
||||
like = findViewById(R.id.like);
|
||||
tag = findViewById(R.id.tag);
|
||||
findViewById(R.id.btn_person).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
RouteManager.forwardAuthActivity();
|
||||
}
|
||||
});
|
||||
|
||||
userInfo = UserManager.getUserBean().getUser();
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<com.shayu.onetoone.bean.UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(com.shayu.onetoone.bean.UserBean data) {
|
||||
@ -312,7 +314,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
if (intent != null) {
|
||||
String label = intent.getStringExtra("label");
|
||||
info.setCn_label(label);
|
||||
like.setText(label);
|
||||
tag.setText(label);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
}
|
||||
@ -321,13 +323,13 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
private void editName() {
|
||||
Intent intent = new Intent(mContext, EditNameActivity.class);
|
||||
intent.putExtra(Constants.NICK_NAME, mUserBean.getUserNiceName());
|
||||
intent.putExtra(Constants.NICK_NAME, userInfo.getUserNicename());
|
||||
cameraUtil.startActivityForResult(intent, new ActivityResultCallback() {
|
||||
@Override
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String nickName = intent.getStringExtra(Constants.NICK_NAME);
|
||||
mUserBean.setSignature(nickName);
|
||||
userInfo.setSignature(nickName);
|
||||
mName.setText(nickName);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
@ -403,13 +405,13 @@ public class EditProfileActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent(mContext, EditSignActivity.class);
|
||||
intent.putExtra(Constants.SIGN, mUserBean.getSignature());
|
||||
intent.putExtra(Constants.SIGN, userInfo.getSignature());
|
||||
cameraUtil.startActivityForResult(intent, new ActivityResultCallback() {
|
||||
@Override
|
||||
public void onSuccess(Intent intent) {
|
||||
if (intent != null) {
|
||||
String sign = intent.getStringExtra(Constants.SIGN);
|
||||
mUserBean.setSignature(sign);
|
||||
userInfo.setSignature(sign);
|
||||
mSign.setText(sign);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
@ -428,7 +430,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
String[] times = mUserBean.getBirthday().split("-");
|
||||
String[] times = userInfo.getBirthday().split("-");
|
||||
year = Integer.parseInt(times[0]);
|
||||
month = Integer.parseInt(times[1]) - 1;
|
||||
day = Integer.parseInt(times[2]);
|
||||
@ -494,21 +496,9 @@ public class EditProfileActivity extends AbsActivity {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEditProfileEvent(/*EditProfileEvent event*/) {
|
||||
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
||||
@Override
|
||||
public void callback(UserBean u) {
|
||||
showData(u);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showData(IMLoginModel u, com.shayu.onetoone.bean.UserBean.UserInfo inf) {
|
||||
userInfo = u;
|
||||
info = inf;
|
||||
|
||||
private void showData(UserBean u) {
|
||||
userModel = u;
|
||||
int index = 0;
|
||||
String birthday = userInfo.getBirthday();
|
||||
String location = userInfo.getLocation();
|
||||
@ -546,7 +536,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
} else if (userInfo.getSex() == 2) {
|
||||
mSex.setText(R.string.sex_female);
|
||||
}
|
||||
like.setText(info.getCn_label());
|
||||
tag.setText(info.getCn_label());
|
||||
mCity.setText(info.getArea());
|
||||
if (1 == userInfo.getIsBind()) {
|
||||
mobile = userInfo.getMobile();
|
||||
@ -590,8 +580,8 @@ public class EditProfileActivity extends AbsActivity {
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
if (mUserBean.getUser().getLoginType().equals("phone")) {
|
||||
mobile = mUserBean.getUser().getMobile();
|
||||
if (userInfo.getLoginType().equals("phone")) {
|
||||
mobile = userInfo.getMobile();
|
||||
tv_bind_phone.setText(mobile);
|
||||
isBind = "1";
|
||||
} else {
|
||||
@ -600,7 +590,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
// getTaskType();
|
||||
if (isName) {
|
||||
/*if (isName) {
|
||||
isName = false;
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getBaseInfos(false, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
@ -608,8 +598,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data != null) {
|
||||
CommonAppConfig.getInstance().setLoginInfo(CommonAppConfig.getInstance().getUid(), CommonAppConfig.getInstance().getToken(), false);
|
||||
mUserBean = data;
|
||||
mName.setText(mUserBean.getUser().getUserNicename());
|
||||
mName.setText(userInfo.getUserNicename());
|
||||
}
|
||||
}
|
||||
|
||||
@ -618,6 +607,6 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
@ -398,6 +398,7 @@
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tag"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
|
Loading…
x
Reference in New Issue
Block a user