Skip to content

Commit

Permalink
1.修改刷新时,如果网络错误且页面有数据,不再页面提示网络错误
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydenxiao2016 committed Dec 2, 2016
1 parent 1ddd286 commit 3586ea9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ public void onLoadMore(View loadMoreView) {
@Override
public void showLoading(String title) {
if( newListAdapter.getPageBean().isRefresh()) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.loading);
if(newListAdapter.getSize()<=0) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.loading);
}
}
}

Expand All @@ -133,8 +135,10 @@ public void stopLoading() {
@Override
public void showErrorTip(String msg) {
if( newListAdapter.getPageBean().isRefresh()) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.error);
loadedTip.setTips(msg);
if(newListAdapter.getSize()<=0) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.error);
loadedTip.setTips(msg);
}
irc.setRefreshing(false);
}else{
irc.setLoadMoreStatus(LoadMoreFooterView.Status.ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public void onLoadMore(View loadMoreView) {
@Override
public void showLoading(String title) {
if( videoListAdapter.getPageBean().isRefresh()) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.loading);
if(videoListAdapter.getSize()<=0) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.loading);
}
}
}

Expand All @@ -169,9 +171,11 @@ public void stopLoading() {
@Override
public void showErrorTip(String msg) {
if( videoListAdapter.getPageBean().isRefresh()) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.error);
loadedTip.setTips(msg);
irc.setRefreshing(false);
if(videoListAdapter.getSize()<=0) {
loadedTip.setLoadingTip(LoadingTip.LoadStatus.error);
loadedTip.setTips(msg);
irc.setRefreshing(false);
}
}else{
irc.setLoadMoreStatus(LoadMoreFooterView.Status.ERROR);
}
Expand Down

0 comments on commit 3586ea9

Please sign in to comment.