From 32afda252ef09c73dc18cf27cd5c5ebc6c7c4515 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 16 Feb 2021 22:20:01 +0100 Subject: [PATCH] Don't flicker with nav drawer loading indicator when refreshing --- .../java/de/danoeh/antennapod/fragment/NavDrawerFragment.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java index c69d46265..be74678d3 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java @@ -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);