Moved refreshing call from onRefresh() (MainActivity) to MainPresenter (getFirstLevel())
This commit is contained in:
parent
9fc86b219b
commit
d53165fe48
@ -21,6 +21,7 @@ public class MainPresenter implements MainContract.Presenter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getFirstLevel() {
|
public void getFirstLevel() {
|
||||||
|
mView.swipeLayoutSetRefreshing(true);
|
||||||
try {
|
try {
|
||||||
coreModel.reinitializeApi();
|
coreModel.reinitializeApi();
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
|
@ -104,7 +104,6 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh() {
|
public void onRefresh() {
|
||||||
mSwipeRefreshLayout.setRefreshing(true);
|
|
||||||
mPresenter.getFirstLevel();
|
mPresenter.getFirstLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user