Open the downloaded artist detail in ArtistListPageFragment

This commit is contained in:
CappielloAntonio 2021-08-31 13:04:22 +02:00
parent ef645143e0
commit 8cef75c763
6 changed files with 17 additions and 14 deletions

View file

@ -88,7 +88,7 @@ public class ArtistListPageFragment extends Fragment {
bind.artistListRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
bind.artistListRecyclerView.setHasFixedSize(true);
artistHorizontalAdapter = new ArtistHorizontalAdapter(requireContext());
artistHorizontalAdapter = new ArtistHorizontalAdapter(requireContext(), artistListPageViewModel.title.equals(Artist.DOWNLOADED));
bind.artistListRecyclerView.setAdapter(artistHorizontalAdapter);
artistListPageViewModel.getArtistList(requireActivity()).observe(requireActivity(), artists -> artistHorizontalAdapter.setItems(artists));
}

View file

@ -148,7 +148,7 @@ public class DownloadFragment extends Fragment {
private void initDownloadedArtistView() {
bind.downloadedArtistRecyclerView.setHasFixedSize(true);
downloadedArtistAdapter = new ArtistHorizontalAdapter(requireContext());
downloadedArtistAdapter = new ArtistHorizontalAdapter(requireContext(), false);
bind.downloadedArtistRecyclerView.setAdapter(downloadedArtistAdapter);
downloadViewModel.getDownloadedArtists(requireActivity(), 20).observe(requireActivity(), artists -> {
if (artists == null) {

View file

@ -398,7 +398,7 @@ public class HomeFragment extends Fragment {
private void initStarredArtistsView() {
bind.starredArtistsRecyclerView.setHasFixedSize(true);
starredArtistAdapter = new ArtistHorizontalAdapter(requireContext());
starredArtistAdapter = new ArtistHorizontalAdapter(requireContext(), false);
bind.starredArtistsRecyclerView.setAdapter(starredArtistAdapter);
homeViewModel.getStarredArtists(requireActivity()).observe(requireActivity(), artists -> {
if (artists == null) {