Merge pull request #9521 from pratyaksh1610/branch-9518
Fixes #9518: Crash fix when click "Add to playlist" while the current list is still loading
This commit is contained in:
commit
6af2242d5d
|
@ -230,24 +230,24 @@ public class PlaylistFragment extends BaseListInfoFragment<StreamInfoItem, Playl
|
||||||
ShareUtils.openUrlInBrowser(requireContext(), url);
|
ShareUtils.openUrlInBrowser(requireContext(), url);
|
||||||
break;
|
break;
|
||||||
case R.id.menu_item_share:
|
case R.id.menu_item_share:
|
||||||
if (currentInfo != null) {
|
ShareUtils.shareText(requireContext(), name, url,
|
||||||
ShareUtils.shareText(requireContext(), name, url,
|
currentInfo == null ? null : currentInfo.getThumbnailUrl());
|
||||||
currentInfo.getThumbnailUrl());
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case R.id.menu_item_bookmark:
|
case R.id.menu_item_bookmark:
|
||||||
onBookmarkClicked();
|
onBookmarkClicked();
|
||||||
break;
|
break;
|
||||||
case R.id.menu_item_append_playlist:
|
case R.id.menu_item_append_playlist:
|
||||||
disposables.add(PlaylistDialog.createCorrespondingDialog(
|
if (currentInfo != null) {
|
||||||
getContext(),
|
disposables.add(PlaylistDialog.createCorrespondingDialog(
|
||||||
getPlayQueue()
|
getContext(),
|
||||||
.getStreams()
|
getPlayQueue()
|
||||||
.stream()
|
.getStreams()
|
||||||
.map(StreamEntity::new)
|
.stream()
|
||||||
.collect(Collectors.toList()),
|
.map(StreamEntity::new)
|
||||||
dialog -> dialog.show(getFM(), TAG)
|
.collect(Collectors.toList()),
|
||||||
));
|
dialog -> dialog.show(getFM(), TAG)
|
||||||
|
));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|
Loading…
Reference in New Issue