mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-18 03:36:28 -07:00
feat: added songBottomSheet to track files within directories
This commit is contained in:
parent
75980ee18b
commit
68c77cefff
3 changed files with 24 additions and 0 deletions
|
|
@ -182,6 +182,11 @@ public class DirectoryFragment extends Fragment implements ClickCallback {
|
|||
MediaManager.startQueue(mediaBrowserListenableFuture, bundle.getParcelableArrayList(Constants.TRACKS_OBJECT), bundle.getInt(Constants.ITEM_POSITION));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMediaLongClick(Bundle bundle) {
|
||||
Navigation.findNavController(requireView()).navigate(R.id.songBottomSheetDialog, bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMusicDirectoryClick(Bundle bundle) {
|
||||
Navigation.findNavController(requireView()).navigate(R.id.directoryFragment, bundle);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,8 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
dismissBottomSheet();
|
||||
}));
|
||||
|
||||
goToAlbum.setVisibility(songBottomSheetViewModel.getSong().getAlbumId() != null ? View.VISIBLE : View.GONE);
|
||||
|
||||
TextView goToArtist = view.findViewById(R.id.go_to_artist_text_view);
|
||||
goToArtist.setOnClickListener(v -> songBottomSheetViewModel.getArtist().observe(getViewLifecycleOwner(), artist -> {
|
||||
if (artist != null) {
|
||||
|
|
@ -208,6 +210,8 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
dismissBottomSheet();
|
||||
}));
|
||||
|
||||
goToArtist.setVisibility(songBottomSheetViewModel.getSong().getArtistId() != null ? View.VISIBLE : View.GONE);
|
||||
|
||||
TextView share = view.findViewById(R.id.share_text_view);
|
||||
share.setOnClickListener(v -> songBottomSheetViewModel.shareTrack().observe(getViewLifecycleOwner(), sharedTrack -> {
|
||||
if (sharedTrack != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue