Commit a421d905 by YKai

fix:修复关注页面数据为空一直在加载中状态的问题

parent 6107ffa1
......@@ -71,8 +71,8 @@ public class TrendsListPresenter implements ITrendsListPresenter, ITrendsListPre
mTrendsListView.hideRefreshProgress();
mTrendsListView.hideLoadingView();
if (null != trendsListBean) {
mTrendsListView.showTopTrendsView(trendsListBean.ext_data);
mTrendsListView.showTrendsListView(trendsListBean.data);
mTrendsListView.showTopTrendsView(trendsListBean.ext_data);
mTrendsListView.showBanner(trendsListBean.bannerResps);
} else {
mTrendsListView.showToast("加载失败:" + trendsListBean.msg);
......
......@@ -4,6 +4,7 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
......@@ -70,7 +71,6 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
private int topic_id;
private int last_id;
private String trendType;
private String userid;
private boolean isTrendsListLoading;
private boolean isRefresh;
private boolean isDoLikeAction;
......@@ -124,7 +124,6 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
tab = getArguments().getInt(KEY_TAB);
topic_id = getArguments().getInt(KEY_TOPIC_ID);
trendType = TextUtils.isEmpty(trendType = getArguments().getString(KEY_TREND_TYPE)) ? TREND_TYPE_DEFAULT : trendType;
userid = getArguments().getString(KEY_USER_ID);
page = 1;
last_id = 0;
}
......@@ -139,6 +138,7 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
doLikeAction(view, position, mDatas);
}
@SuppressLint("CheckResult")
@Override
public void onItemClick(int id, int commentCount, int position) {
TrendsListBean.Trend trend = trendsDatas.get(position - mRcvAdapter.getHeadersCount());
......@@ -433,6 +433,11 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
@Override
public void showTrendsListView(List<TrendsListBean.Trend> data) {
isTrendsListLoading = false;
if (data==null||data.size()==0){
noDataRel.setVisibility(View.VISIBLE);
trendsRcv.setVisibility(View.GONE);
return;
}
showLoadSuccessView();
if (page == 1) {
if (null == trendsDatas) {
......
......@@ -103,12 +103,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
val askObservable = mModel.askRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页问答数据
homeList.add(
getHomeItemFromTempData(
it,
HomeViewConfig.getOrder().dynamicIndex!!
)
)
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().dynamicIndex!!))
}
val museObservable = mModel.museRequest()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment