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:
Stypox 2022-12-31 23:31:58 +01:00 committed by GitHub
commit 6af2242d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 13 deletions

View File

@ -230,15 +230,14 @@ 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.getThumbnailUrl()); currentInfo == null ? null : 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:
if (currentInfo != null) {
disposables.add(PlaylistDialog.createCorrespondingDialog( disposables.add(PlaylistDialog.createCorrespondingDialog(
getContext(), getContext(),
getPlayQueue() getPlayQueue()
@ -248,6 +247,7 @@ public class PlaylistFragment extends BaseListInfoFragment<StreamInfoItem, Playl
.collect(Collectors.toList()), .collect(Collectors.toList()),
dialog -> dialog.show(getFM(), TAG) dialog -> dialog.show(getFM(), TAG)
)); ));
}
break; break;
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);