fix:调整个人资料相册数据源
This commit is contained in:
@@ -71,7 +71,6 @@ import com.chwl.core.user.bean.UserPhoto;
|
||||
import com.chwl.core.user.event.LoginUserInfoUpdateEvent;
|
||||
import com.chwl.core.utils.CoreLogger;
|
||||
import com.chwl.library.annatation.ActLayoutRes;
|
||||
import com.zhpan.bannerview.BannerViewPager;
|
||||
import com.zhpan.bannerview.constants.IndicatorGravity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
@@ -9,8 +9,8 @@ import com.chwl.core.user.bean.UserDetailInfo
|
||||
import com.chwl.core.user.bean.UserPhoto
|
||||
|
||||
class UserInfoAlbumAdapter :
|
||||
BaseQuickAdapter<UserDetailInfo.DataBean.PrivatePhotoBean, BaseViewHolder>(R.layout.user_info_item_album) {
|
||||
override fun convert(helper: BaseViewHolder, item: UserDetailInfo.DataBean.PrivatePhotoBean) {
|
||||
BaseQuickAdapter<UserPhoto, BaseViewHolder>(R.layout.user_info_item_album) {
|
||||
override fun convert(helper: BaseViewHolder, item: UserPhoto) {
|
||||
val imageView = helper.getView<ImageView>(R.id.iv_image)
|
||||
imageView.load(item.photoUrl)
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ class UserInfoDataFragment : BaseViewBindingFragment<UserInfoDataFragmentBinding
|
||||
}
|
||||
showPhotoPreview(ArrayList(list), position)
|
||||
}
|
||||
viewModel.userInfoDetailData.observe(this) {
|
||||
viewModel.userInfoData.observe(this) {
|
||||
binding.tvAlbumCount.text = "(${it.privatePhoto?.size ?: 0})"
|
||||
binding.tvAlbumStatus.isVisible = it.privatePhoto.isNullOrEmpty()
|
||||
albumAdapter.setNewData(it.privatePhoto)
|
||||
|
Reference in New Issue
Block a user