mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
don't toast when livestream
This commit is contained in:
parent
9795f9846f
commit
74c0fe85e2
@ -863,20 +863,16 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// check if livestream
|
binding.relPlayerDownload.setOnClickListener {
|
||||||
if (response.duration > 0) {
|
if (response.duration <= 0) {
|
||||||
// download clicked
|
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
|
||||||
binding.relPlayerDownload.setOnClickListener {
|
} else if (!DownloadService.IS_DOWNLOAD_RUNNING) {
|
||||||
if (!DownloadService.IS_DOWNLOAD_RUNNING) {
|
val newFragment = DownloadDialog(videoId!!)
|
||||||
val newFragment = DownloadDialog(videoId!!)
|
newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
|
||||||
newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
|
} else {
|
||||||
} else {
|
Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT)
|
||||||
Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT)
|
.show()
|
||||||
.show()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.hls != null) {
|
if (response.hls != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user