1.家族成员列表家族更多 bug fix

2.我的 我的公会入口家族长也展示入口
This commit is contained in:
huangjian
2020-11-21 15:43:30 +08:00
parent 67f3ee4b98
commit 39c3ae5211
5 changed files with 25 additions and 107 deletions

View File

@@ -244,31 +244,6 @@ public class MeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentP
String star = StarUtils.getConstellation(new Date(mUserInfo.getBirth()));
mBinding.tvConstellation.setText(star);
// 头像遮罩
// GlideApp.with(mContext)
// .load(mUserInfo.getAvatar())
// .dontAnimate()
// .centerInside()
// .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
// .listener(new RequestListener<Drawable>() {
// @Override
// public boolean onLoadFailed(@Nullable GlideException e, Object o,
// Target<Drawable> target, boolean b) {
// return false;
// }
//
// @Override
// public boolean onResourceReady(Drawable drawable, Object o,
// Target<Drawable> target, DataSource dataSource, boolean b) {
// drawable.setColorFilter(mContext.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
// ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
// viewTarget.getView().setImageDrawable(drawable);
// return true;
// }
// })
// // “23”设置模糊度(在0.0到25.0之间)默认”25";"4":图片缩放比例,默认“1”。
// .transforms(new BlurTransformation(mContext, 25, 1))
// .into(mBinding.ivUserAvatarShadow);
}
}
@@ -357,74 +332,9 @@ public class MeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentP
break;
case R.id.me_item_invite:
// UIHelper.showSettingAct(mContext);
// SingleToastUtil.showToast("邀请好友");
CommonWebViewActivity.start(mContext, UriProvider.getShareUrl());
break;
// case R.id.me_item_charge:
// startActivity(new Intent(mContext, WalletGoldActivity.class));
// break;
// case R.id.me_item_noble:
// boolean isNoble = mNobleInfo != null && mNobleInfo.getLevel() > 0 || mUserInfo != null && mUserInfo.getNobleInfo() != null && mUserInfo.getNobleInfo().getLevel() > 0;
// if (isNoble) {
// CommonWebViewActivity.start(mContext, UriProvider.IM_SERVER_URL + "modules/nobles/homepage.html",
// new CommonWebViewActivity.WebViewCallBack() {
// @Override
// public void onResult(String str) {
// UserModel.get().updateCurrentUserInfo().subscribe();
// }
// });
// } else {
// CommonWebViewActivity.start(mContext, UriProvider.getNobleIntro(),
// new CommonWebViewActivity.WebViewCallBack() {
// @Override
// public void onResult(String str) {
// UserModel.get().updateCurrentUserInfo().subscribe();
// }
// });
// }
// break;
// case R.id.me_item_car_shop:
// if (mUserInfo != null) {
// DecorationStoreActivity.start(mContext, mUserInfo.getUid());
// }
// break;
// case R.id.ll_module_hall:
// if (mUserInfo == null) {
// return;
// }
// ModuleHallActivity.start(mContext);
// break;
// case R.id.ll_approve:
// StatisticManager.Instance().onEvent(StatisticsProtocol.Event.personal_data_101prove, "101认证");
//
// CommonWebViewActivity.start(getActivity(), UriProvider.getTutuAprove());
// break;
// case R.id.ll_authen:
// checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA)
// .subscribe(result -> {
// if (result) {
// CommonWebViewActivity.start(getActivity(), UriProvider.getTutuRealNamePage());
// } else {
// SingleToastUtil.showToast(getString(R.string.ask_again));
// }
// });
// break;
// case R.id.ll_recommend_position:
// StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_MY_RECOMMEND_CLICK, "我的推荐卡");
// MyRecommendCardActivity.start(getActivity());
// break;
case R.id.ll_kf:
getDialogManager().showOkCancelDialog("点击确认后将发起客户对话框,确认联系客服吗?",
new DialogManager.OkCancelDialogListener() {

View File

@@ -344,7 +344,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
}
if (clanInfo != null && clanInfo.getId() > 0) {
if (hallInfo != null && hallInfo.getHallId() > 0) {
mBinding.tvHallDetail.setText("公会.家族");
mBinding.tvHallDetail.setText("家族.公会");
} else {
mBinding.tvHallDetail.setText("家族");
}

View File

@@ -53,6 +53,8 @@ public class HallDataManager {
private int roleType = 0 ;
private int clanRoleType = 0;
/**家族信息*/
private MutableLiveData<ClanInfo> liveClanInfo;
@@ -99,11 +101,13 @@ public class HallDataManager {
private void initHallInfo() {
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
if (userInfo != null) {
roleType = userInfo.getHallRoleType();
clanRoleType = userInfo.getClanRoleType();
long newHallId = userInfo.getHallId();
if (hallInfo == null || lastHallId != newHallId) {
hallInfo = new HallInfo();
hallInfo.setHallId(newHallId);
liveHallExist.setValue(newHallId > 0);
liveHallExist.setValue(newHallId > 0 || clanRoleType == RoleType.CLAN_OWNER);
if (newHallId > 0) {
updateHallInfo();
}
@@ -113,7 +117,6 @@ public class HallDataManager {
}
}
lastHallId = newHallId;
roleType = userInfo.getHallRoleType();
}
}
@@ -157,7 +160,7 @@ public class HallDataManager {
public void updateHallInfo(HallInfo info) {
hallInfo = info;
liveHallName.setValue(hallInfo.getHallName());
liveHallExist.setValue(hallInfo.getHallId() > 0);
liveHallExist.setValue(hallInfo.getHallId() > 0 || clanRoleType == RoleType.CLAN_OWNER);
liveHallID.setValue(hallInfo.getHallId());
}

View File

@@ -425,19 +425,21 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
if (list.size() == 0) {
if (page == 1) {
showNoData();
} else {
mGroupMemberListAdapter.loadMoreEnd();
}
} else {
hideStatus();
if (page == 1) {
mGroupMemberListAdapter.setNewData(list);
mGroupMemberListAdapter.loadMoreComplete();
mGroupMemberListAdapter.disableLoadMoreIfNotFullPage();
} else {
mGroupMemberListAdapter.addData(list);
if (ListUtils.isListEmpty(list) || list.size() < 20) {
mGroupMemberListAdapter.loadMoreEnd();
} else {
mGroupMemberListAdapter.loadMoreComplete();
}
}
if (list.size() < 20) {
mGroupMemberListAdapter.loadMoreEnd();
} else {
mGroupMemberListAdapter.loadMoreComplete();
}
page++;
}

View File

@@ -17,6 +17,7 @@
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/fl_top_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
@@ -225,7 +226,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
app:layout_constraintTop_toBottomOf="@id/barrier_top" />
app:layout_constraintTop_toBottomOf="@id/barrier_top"
tools:itemCount="1"
tools:listitem="@layout/item_tab_small" />
<LinearLayout
android:id="@+id/ll_hall_list"
@@ -240,17 +243,18 @@
android:paddingEnd="8dp"
android:paddingBottom="17dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/rv_option">
app:layout_constraintTop_toBottomOf="@id/fl_top_bg"
tools:visibility="visible">
<TextView
android:id="@+id/tv_clan_member_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:paddingStart="14dp"
android:paddingStart="7dp"
android:paddingTop="10dp"
android:paddingEnd="14dp"
android:paddingBottom="10dp"
android:paddingBottom="5dp"
android:textColor="@color/color_333333"
android:textSize="15dp"
tools:text="公会列表(8)" />
@@ -284,10 +288,9 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_weight="1"
android:paddingStart="14dp"
android:paddingStart="7dp"
android:paddingTop="10dp"
android:paddingEnd="14dp"
android:paddingBottom="10dp"
android:text="总人数:0人"
android:textColor="@color/color_333333"
android:textSize="15dp" />