stopping refreshlayout animation when an exception is raised

This commit is contained in:
Shinokuni 2019-02-03 13:06:21 +00:00
parent ff8b9156db
commit 1a9bba1e44
1 changed files with 1 additions and 1 deletions

View File

@ -179,11 +179,11 @@ public class MainActivity extends AppCompatActivity implements SimpleCallback, S
public void onSuccess() {
refreshLayout.setRefreshing(false);
adapter.submitList(newItems);
//newItems.clear();
}
@Override
public void onFailure(Exception e) {
refreshLayout.setRefreshing(false);
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}