Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
fix: 查看更多回复中层主图片无法显示 (#230)
Browse files Browse the repository at this point in the history
Co-authored-by: Aunix <[email protected]>
  • Loading branch information
Aunixtoyou and Aunix authored Jan 26, 2024
1 parent e368317 commit f615da4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ private List<View> getContentViews(SubFloorListBean.PostInfo postListItemBean) {
ImageView imageView = new ImageView(getContext());
imageView.setLayoutParams(getLayoutParams(contentBean));
imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
ImageUtil.load(imageView, ImageUtil.LOAD_TYPE_SMALL_PIC, contentBean.getSrc());
ImageUtil.load(imageView, ImageUtil.LOAD_TYPE_SMALL_PIC, ImageUtil.getNonNullString(contentBean.getCdnSrc(), contentBean.getOriginSrc()));
List<PhotoViewBean> photoViewBeans = new ArrayList<>();
photoViewBeans.add(new PhotoViewBean(ImageUtil.getNonNullString(contentBean.getSrc(), contentBean.getOriginSrc()),
ImageUtil.getNonNullString(contentBean.getOriginSrc(), contentBean.getSrc()),
photoViewBeans.add(new PhotoViewBean(ImageUtil.getNonNullString(contentBean.getCdnSrc(), contentBean.getOriginSrc()),
ImageUtil.getNonNullString(contentBean.getOriginSrc(), contentBean.getCdnSrc()),
"1".equals(contentBean.isLongPic())));
ImageUtil.initImageView(imageView, photoViewBeans, 0);
views.add(imageView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public ForumPageBean.MediaInfoBean cast(ForumBean.MediaBean mediaBean) {
if (mediaBean.getBigPic().contains(".hiphotos.baidu.com") || mediaBean.getBigPic().contains("imgsrc.baidu.com")) {
origin = "http://imgsrc.baidu.com/forum/pic/item/" + fileName;
} else {
origin = "http://tiebapic.baidu.com/forum/pic/item/" + fileName;
origin = "http://imgsa.baidu.com/forum/pic/item/" + fileName;
}
mediaInfoBean.setBigPic(mediaBean.getBigPic())
.setShowOriginalBtn(mediaBean.isGif() ? "0" : "1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ object MixedTiebaApiImpl : ITiebaApi {
override fun floor(
threadId: String, page: Int, postId: String?, subPostId: String?
): Call<SubFloorListBean> =
RetrofitTiebaApi.MINI_TIEBA_API.floor(threadId, page, postId, subPostId)
RetrofitTiebaApi.OFFICIAL_TIEBA_API.floor(threadId, page, postId, subPostId)

override fun forumHomeAsync(sortType: Int, page: Int): Deferred<ApiResult<ForumHome>> {
return RetrofitTiebaApi.WEB_TIEBA_API.getForumHomeAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,4 +534,14 @@ interface OfficialTiebaApi {
@Field("friend_uid") friendUid: String?,
@Field("is_guest") is_guest: String?,
): Flow<UserLikeForumBean>

@POST("/c/f/pb/floor")
@FormUrlEncoded
fun floor(
@Field("kz") threadId: String,
@Field("pn") page: Int = 1,
@Field("pid") postId: String?,
@Field("spid") subPostId: String?,
@Field("rn") rn: Int = 20
): Call<SubFloorListBean>
}

0 comments on commit f615da4

Please sign in to comment.