Skip to content

Commit

Permalink
fix: can't download new video while other download in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Sep 8, 2023
1 parent 6a2c83a commit 5b5fcb4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -998,13 +998,10 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
binding.relPlayerDownload.setOnClickListener {
if (streams.duration <= 0) {
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
} else if (!DownloadService.IS_DOWNLOAD_RUNNING) {
} else {
val newFragment = DownloadDialog()
newFragment.arguments = bundleOf(IntentData.videoId to videoId)
newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
} else {
Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT)
.show()
}
}

Expand Down

0 comments on commit 5b5fcb4

Please sign in to comment.