mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-22 04:13:05 +00:00
Leanback: formatting
This commit is contained in:
parent
f68de9edd7
commit
a6256641e4
3 changed files with 5 additions and 5 deletions
|
@ -18,7 +18,7 @@ import de.nicidienase.chaosflix.leanback.events.EventsActivity
|
|||
import de.nicidienase.chaosflix.leanback.events.EventsActivity.Companion.start
|
||||
import de.nicidienase.chaosflix.leanback.settings.ChaosflixSettingsActivity
|
||||
|
||||
class ItemViewClickedListener(private val fragment: Fragment, private val streamUpdater: (()->Unit)? = null) : OnItemViewClickedListener {
|
||||
class ItemViewClickedListener(private val fragment: Fragment, private val streamUpdater: (() -> Unit)? = null) : OnItemViewClickedListener {
|
||||
override fun onItemClicked(itemViewHolder: Presenter.ViewHolder, item: Any, rowViewHolder: RowPresenter.ViewHolder?, row: Row?) {
|
||||
Log.d(TAG, "onItemClicked")
|
||||
val activity = fragment.requireActivity()
|
||||
|
|
|
@ -84,7 +84,7 @@ class ConferencesBrowseFragment : BrowseSupportFragment() {
|
|||
|
||||
rowsAdapter.add(conferencesSection)
|
||||
|
||||
onItemViewClickedListener = ItemViewClickedListener(this){
|
||||
onItemViewClickedListener = ItemViewClickedListener(this) {
|
||||
viewModel.updateLiveStreams()
|
||||
}
|
||||
adapter = rowsAdapter
|
||||
|
|
|
@ -8,7 +8,7 @@ import androidx.leanback.widget.PlaybackControlsRow
|
|||
import com.google.android.exoplayer2.ext.leanback.LeanbackPlayerAdapter
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class ChaosMediaPlayerGlue(context: Context, playerAdapter: LeanbackPlayerAdapter, private val bookmarkCreator: (()->Unit)? = null) :
|
||||
class ChaosMediaPlayerGlue(context: Context, playerAdapter: LeanbackPlayerAdapter, private val bookmarkCreator: (() -> Unit)? = null) :
|
||||
PlaybackTransportControlGlue<LeanbackPlayerAdapter>(context, playerAdapter) {
|
||||
|
||||
private val mThumbsUpAction = PlaybackControlsRow.ThumbsUpAction(context).apply { index = PlaybackControlsRow.ThumbsUpAction.INDEX_OUTLINE }
|
||||
|
@ -50,8 +50,8 @@ class ChaosMediaPlayerGlue(context: Context, playerAdapter: LeanbackPlayerAdapte
|
|||
}
|
||||
|
||||
private fun notifyActionChanged(
|
||||
action: PlaybackControlsRow.MultiAction,
|
||||
adapter: ArrayObjectAdapter?
|
||||
action: PlaybackControlsRow.MultiAction,
|
||||
adapter: ArrayObjectAdapter?
|
||||
) {
|
||||
if (adapter != null) {
|
||||
val index = adapter.indexOf(action)
|
||||
|
|
Loading…
Reference in a new issue