Merge pull request #5196 from jhenninger/fix-stuck-swipe-refresh-layout

Fix stuck swipe refresh indicator
This commit is contained in:
ByteHamster 2021-06-05 17:44:40 +02:00 committed by GitHub
commit 8bcbc7ae32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1 additions and 14 deletions

View File

@ -73,7 +73,6 @@ public class CompletedDownloadsFragment extends Fragment {
recyclerView = root.findViewById(R.id.recyclerView);
recyclerView.setRecycledViewPool(((MainActivity) getActivity()).getRecycledViewPool());
recyclerView.setVisibility(View.GONE);
adapter = new CompletedDownloadsListAdapter((MainActivity) getActivity());
recyclerView.setAdapter(adapter);
progressBar = root.findViewById(R.id.progLoading);

View File

@ -194,7 +194,6 @@ public abstract class EpisodesListFragment extends Fragment {
txtvInformation = root.findViewById(R.id.txtvInformation);
recyclerView = root.findViewById(android.R.id.list);
recyclerView.setVisibility(View.GONE);
recyclerView.setRecycledViewPool(((MainActivity) getActivity()).getRecycledViewPool());
setupLoadMoreScrollListener();

View File

@ -156,7 +156,6 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
recyclerView = root.findViewById(R.id.recyclerView);
recyclerView.setRecycledViewPool(((MainActivity) getActivity()).getRecycledViewPool());
recyclerView.setVisibility(View.GONE);
progressBar = root.findViewById(R.id.progLoading);
txtvTitle = root.findViewById(R.id.txtvTitle);
@ -436,7 +435,6 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
adapter = new FeedItemListAdapter((MainActivity) getActivity());
recyclerView.setAdapter(adapter);
}
recyclerView.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.GONE);
if (feed != null) {
adapter.updateItems(feed.getItems());

View File

@ -75,7 +75,6 @@ public class PlaybackHistoryFragment extends Fragment implements Toolbar.OnMenuI
recyclerView = root.findViewById(R.id.recyclerView);
recyclerView.setRecycledViewPool(((MainActivity) getActivity()).getRecycledViewPool());
recyclerView.setVisibility(View.GONE);
adapter = new PlaybackHistoryListAdapter((MainActivity) getActivity());
recyclerView.setAdapter(adapter);
progressBar = root.findViewById(R.id.progLoading);

View File

@ -556,11 +556,9 @@ public class QueueFragment extends Fragment implements Toolbar.OnMenuItemClickLi
emptyView.updateAdapter(recyclerAdapter);
}
recyclerAdapter.updateItems(queue);
recyclerView.setVisibility(View.VISIBLE);
} else {
recyclerAdapter = null;
recyclerView.setVisibility(View.GONE);
emptyView.updateAdapter(recyclerAdapter);
emptyView.updateAdapter(null);
}
if (restoreScrollPosition) {
@ -602,7 +600,6 @@ public class QueueFragment extends Fragment implements Toolbar.OnMenuItemClickLi
disposable.dispose();
}
if (queue == null) {
recyclerView.setVisibility(View.GONE);
emptyView.hide();
progLoading.setVisibility(View.VISIBLE);
}

View File

@ -120,7 +120,6 @@ public class SearchFragment extends Fragment {
recyclerView = layout.findViewById(R.id.recyclerView);
recyclerView.setRecycledViewPool(((MainActivity) getActivity()).getRecycledViewPool());
recyclerView.setVisibility(View.GONE);
adapter = new EpisodeItemListAdapter((MainActivity) getActivity());
recyclerView.setAdapter(adapter);

View File

@ -18,7 +18,6 @@ import de.danoeh.antennapod.R;
public class EmptyViewHandler {
private boolean layoutAdded = false;
private View list;
private ListAdapter listAdapter;
private RecyclerView.Adapter<?> recyclerAdapter;
@ -61,7 +60,6 @@ public class EmptyViewHandler {
}
addToParentView(listView);
layoutAdded = true;
this.list = listView;
listView.setEmptyView(emptyView);
updateAdapter(listView.getAdapter());
}
@ -72,7 +70,6 @@ public class EmptyViewHandler {
}
addToParentView(recyclerView);
layoutAdded = true;
this.list = recyclerView;
updateAdapter(recyclerView.getAdapter());
}
@ -142,7 +139,6 @@ public class EmptyViewHandler {
} else {
empty = true;
}
list.setVisibility(empty ? View.GONE : View.VISIBLE);
emptyView.setVisibility(empty ? View.VISIBLE : View.GONE);
}
}