From d53165fe487189960ed3fce7d71d5460e8264733 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sat, 5 Jan 2019 15:34:02 +0400 Subject: [PATCH] Moved refreshing call from onRefresh() (MainActivity) to MainPresenter (getFirstLevel()) --- app/src/main/java/ru/volgorobot/vrcatalog/MainPresenter.java | 1 + app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/MainPresenter.java b/app/src/main/java/ru/volgorobot/vrcatalog/MainPresenter.java index c707bef..3fa59d7 100644 --- a/app/src/main/java/ru/volgorobot/vrcatalog/MainPresenter.java +++ b/app/src/main/java/ru/volgorobot/vrcatalog/MainPresenter.java @@ -21,6 +21,7 @@ public class MainPresenter implements MainContract.Presenter { @Override public void getFirstLevel() { + mView.swipeLayoutSetRefreshing(true); try { coreModel.reinitializeApi(); } catch (IllegalStateException e) { diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java b/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java index b0a21d1..dffbd16 100644 --- a/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java +++ b/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java @@ -104,7 +104,6 @@ public class MainActivity extends AppCompatActivity @Override public void onRefresh() { - mSwipeRefreshLayout.setRefreshing(true); mPresenter.getFirstLevel(); }