Commit bd584546 authored by Robert Hitt's avatar Robert Hitt
Browse files

Fixed error in MainPresenter

- Pretty dumb mistake, didn't put a reference to mMainView within the
if statement that checks if it isn't null
parent 2fbd0882
Pipeline #1336 failed with stages
in 3 minutes and 8 seconds
...@@ -64,11 +64,12 @@ public class MainPresenter { ...@@ -64,11 +64,12 @@ public class MainPresenter {
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
updateOpenStatus(); updateOpenStatus();
if(mMainView != null) if(mMainView != null) {
mMainView.dismissProgressBar(); mMainView.dismissProgressBar();
Toast.makeText(mMainView.getContext(), "Error getting data; " + Toast.makeText(mMainView.getContext(), "Error getting data; " +
"schedules may be out of date.", Toast.LENGTH_LONG).show(); "schedules may be out of date.", Toast.LENGTH_LONG).show();
} }
@Override @Override
public void onNext(List<Facility> facilities) { public void onNext(List<Facility> facilities) {
writeToRealm(facilities); writeToRealm(facilities);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment