Skip to content
Snippets Groups Projects
Commit 7a7ad100 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Remove the useless checkbox in the jump to time dialog

parent 7c9bde64
No related branches found
No related tags found
1 merge request!1909Time picker
......@@ -34,6 +34,8 @@ class JumpToTimeDialog : PickTimeFragment() {
dismiss()
}
override fun showTimeOnly() = true
override fun getTitle(): Int {
return R.string.jump_to_time
}
......
......@@ -32,6 +32,7 @@ import androidx.lifecycle.lifecycleScope
import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.onEach
import org.videolan.tools.setGone
import org.videolan.vlc.PlaybackService
import org.videolan.vlc.R
import org.videolan.vlc.databinding.AudioBrowserBinding
......@@ -53,6 +54,8 @@ abstract class PickTimeFragment : VLCBottomSheetDialogFragment(), View.OnClickLi
lateinit var playbackService: PlaybackService
abstract fun showTimeOnly(): Boolean
abstract fun getTitle(): Int
open fun showDeleteCurrent() = false
......@@ -80,6 +83,9 @@ abstract class PickTimeFragment : VLCBottomSheetDialogFragment(), View.OnClickLi
binding.timPicDeleteCurrent.onFocusChangeListener = this
mTextColor = binding.timPicTimetojump.currentTextColor
if (showTimeOnly()) {
binding.timPicWaitCheckbox.setGone()
}
return binding.root
}
......
......@@ -42,6 +42,8 @@ class SleepTimerDialog : PickTimeFragment() {
private lateinit var settings: SharedPreferences
private val playlistModel by lazy { PlaylistModel.get(this) }
override fun showTimeOnly() = false
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
val view = super.onCreateView(inflater, container, savedInstanceState)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment