Don't flicker with nav drawer loading indicator when refreshing
This commit is contained in:
parent
cf2d1006df
commit
32afda252e
|
@ -331,7 +331,6 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli
|
||||||
};
|
};
|
||||||
|
|
||||||
private void loadData() {
|
private void loadData() {
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
|
||||||
disposable = Observable.fromCallable(DBReader::getNavDrawerData)
|
disposable = Observable.fromCallable(DBReader::getNavDrawerData)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
@ -340,7 +339,7 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli
|
||||||
navDrawerData = result;
|
navDrawerData = result;
|
||||||
updateSelection(); // Selected item might be a feed
|
updateSelection(); // Selected item might be a feed
|
||||||
navAdapter.notifyDataSetChanged();
|
navAdapter.notifyDataSetChanged();
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE); // Stays hidden once there is something in the list
|
||||||
}, error -> {
|
}, error -> {
|
||||||
Log.e(TAG, Log.getStackTraceString(error));
|
Log.e(TAG, Log.getStackTraceString(error));
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in New Issue