Making sure that we don't miss updates
This commit is contained in:
parent
466e6a9b7e
commit
510f00e204
|
@ -409,8 +409,9 @@ public class FeedItemlistFragment extends ListFragment {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onFragmentLoaded() {
|
private void displayList() {
|
||||||
if(!isVisible()) {
|
if (getView() == null) {
|
||||||
|
Log.e(TAG, "Required root view is not yet created. Stop binding data to UI.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (adapter == null) {
|
if (adapter == null) {
|
||||||
|
@ -612,7 +613,7 @@ public class FeedItemlistFragment extends ListFragment {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(result -> {
|
.subscribe(result -> {
|
||||||
feed = result.orElse(null);
|
feed = result.orElse(null);
|
||||||
onFragmentLoaded();
|
displayList();
|
||||||
}, error -> Log.e(TAG, Log.getStackTraceString(error)));
|
}, error -> Log.e(TAG, Log.getStackTraceString(error)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue