From bb93f94c6c70d98c0a7788b8500bbab2290adc38 Mon Sep 17 00:00:00 2001 From: heaven7 <18111646505@163.com> Date: Mon, 20 Jul 2020 16:21:05 +0800 Subject: [PATCH] opt --- .../com/heaven7/android/component/network/list/ListHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Android-components/android-app-components/src/main/java/com/heaven7/android/component/network/list/ListHelper.java b/Android-components/android-app-components/src/main/java/com/heaven7/android/component/network/list/ListHelper.java index 5d84a84..b5ef3ee 100644 --- a/Android-components/android-app-components/src/main/java/com/heaven7/android/component/network/list/ListHelper.java +++ b/Android-components/android-app-components/src/main/java/com/heaven7/android/component/network/list/ListHelper.java @@ -162,6 +162,7 @@ public void requestData(boolean refresh) { } //show error. if(!hasConnectedNetwork(getAppLoadingComponent().getRecyclerView().getContext())){ + mComponent.showPlaceholderView(AppLoadingComponent.CODE_NO_NETWORK); mComponent.getErrorDelegate().show(AppLoadingComponent.CODE_NO_NETWORK, null, null); mAdapterDelegate.clearItems(); return; @@ -194,6 +195,7 @@ public void onResult(String url, boolean refresh, T data) { //empty if (listData.isEmpty() && mPageM.getPageNo() == 1) { if (!mCallback.showEmpty(this)) { + mComponent.showPlaceholderView(0); mComponent.getEmptyDelegate().show(0, null, null); } return;