Fix some crashes / issues after player refactor

This commit is contained in:
Stypox 2022-04-09 10:48:34 +02:00
parent 5ba14c4b7c
commit eba3996878
8 changed files with 192 additions and 119 deletions

View file

@ -38,14 +38,14 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) :
private var performListener: PerformListener? = null
fun performListener(listener: PerformListener) = apply {
fun performListener(listener: PerformListener?) = apply {
performListener = listener
}
private var seekSecondsSupplier: () -> Int = { 0 }
fun seekSecondsSupplier(supplier: () -> Int) = apply {
seekSecondsSupplier = supplier
fun seekSecondsSupplier(supplier: (() -> Int)?) = apply {
seekSecondsSupplier = supplier ?: { 0 }
}
// Indicates whether this (double) tap is the first of a series