Merge pull request #4944 from ByteHamster/dont-restart-loading-indicator

Don't flicker with nav drawer loading indicator when refreshing
This commit is contained in:
ByteHamster 2021-02-17 09:28:54 +01:00 committed by GitHub
commit 64304cee8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -331,7 +331,6 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli
};
private void loadData() {
progressBar.setVisibility(View.VISIBLE);
disposable = Observable.fromCallable(DBReader::getNavDrawerData)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -340,7 +339,7 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli
navDrawerData = result;
updateSelection(); // Selected item might be a feed
navAdapter.notifyDataSetChanged();
progressBar.setVisibility(View.GONE);
progressBar.setVisibility(View.GONE); // Stays hidden once there is something in the list
}, error -> {
Log.e(TAG, Log.getStackTraceString(error));
progressBar.setVisibility(View.GONE);