mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-04 16:23:08 +00:00
Removed duplicated code
This commit is contained in:
@@ -103,7 +103,6 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Exception exception) {
|
public void onError(Exception exception) {
|
||||||
Log.e(TAG, "onError() " + exception.getMessage());
|
Log.e(TAG, "onError() " + exception.getMessage());
|
||||||
|
|
||||||
dismissBottomSheet();
|
dismissBottomSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,8 +174,9 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putParcelable("artist_object", artist);
|
bundle.putParcelable("artist_object", artist);
|
||||||
NavHostFragment.findNavController(this).navigate(R.id.artistPageFragment, bundle);
|
NavHostFragment.findNavController(this).navigate(R.id.artistPageFragment, bundle);
|
||||||
} else
|
} else {
|
||||||
Toast.makeText(requireContext(), getString(R.string.album_error_retrieving_artist), Toast.LENGTH_SHORT).show();
|
Toast.makeText(requireContext(), getString(R.string.album_error_retrieving_artist), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
dismissBottomSheet();
|
dismissBottomSheet();
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Exception exception) {
|
public void onError(Exception exception) {
|
||||||
Log.e(TAG, "onError() " + exception.getMessage());
|
Log.e(TAG, "onError() " + exception.getMessage());
|
||||||
|
|
||||||
dismissBottomSheet();
|
dismissBottomSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,8 +106,6 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
|
|||||||
if (media.size() > 0) {
|
if (media.size() > 0) {
|
||||||
MediaManager.startQueue(mediaBrowserListenableFuture, requireContext(), (ArrayList<Song>) media, 0);
|
MediaManager.startQueue(mediaBrowserListenableFuture, requireContext(), (ArrayList<Song>) media, 0);
|
||||||
((MainActivity) requireActivity()).setBottomSheetInPeek(true);
|
((MainActivity) requireActivity()).setBottomSheetInPeek(true);
|
||||||
|
|
||||||
dismissBottomSheet();
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(requireContext(), getString(R.string.artist_error_retrieving_radio), Toast.LENGTH_SHORT).show();
|
Toast.makeText(requireContext(), getString(R.string.artist_error_retrieving_radio), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user