Refactor creation of DownloadDialog

This commit is contained in:
Stypox 2022-06-18 17:40:22 +02:00
parent a3369ba3a4
commit bb4a8ebcd8
3 changed files with 39 additions and 120 deletions

View file

@ -1689,11 +1689,7 @@ public final class VideoDetailFragment
}
try {
final DownloadDialog downloadDialog = DownloadDialog.newInstance(activity,
currentInfo);
downloadDialog.setSelectedVideoStream(ListHelper.getDefaultResolutionIndex(activity,
downloadDialog.wrappedVideoStreams.getStreamsList()));
final DownloadDialog downloadDialog = new DownloadDialog(activity, currentInfo);
downloadDialog.show(activity.getSupportFragmentManager(), "downloadDialog");
} catch (final Exception e) {
ErrorUtil.showSnackbar(activity, new ErrorInfo(e, UserAction.DOWNLOAD_OPEN_DIALOG,