mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
fix watch progress crash
This commit is contained in:
parent
3ca43d9ad0
commit
b259bfb8b0
@ -25,7 +25,7 @@ fun View?.setWatchProgressLength(videoId: String, duration: Long) {
|
||||
.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
this@setWatchProgressLength.getViewTreeObserver().removeOnGlobalLayoutListener(this)
|
||||
if (progress == null) {
|
||||
if (progress == null || duration == 0L) {
|
||||
view.visibility = View.GONE
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user