The viewmodels have been modified to not repeat calls to the backend during the lifecycle of the fragment
This commit is contained in:
@@ -82,7 +82,7 @@ public class PlaylistChooserDialog extends DialogFragment {
|
||||
playlistDialogHorizontalAdapter = new PlaylistDialogHorizontalAdapter(requireContext(), playlistChooserViewModel, this);
|
||||
bind.playlistDialogRecyclerView.setAdapter(playlistDialogHorizontalAdapter);
|
||||
|
||||
playlistChooserViewModel.getPlaylistList().observe(getViewLifecycleOwner(), playlists -> {
|
||||
playlistChooserViewModel.getPlaylistList(getViewLifecycleOwner()).observe(getViewLifecycleOwner(), playlists -> {
|
||||
if (playlists != null) {
|
||||
if (playlists.size() > 0) {
|
||||
if (bind != null) bind.noPlaylistsCreatedTextView.setVisibility(View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user