Leanback: formatting

This commit is contained in:
Felix 2020-04-10 01:13:01 +02:00
parent f68de9edd7
commit a6256641e4
3 changed files with 5 additions and 5 deletions

View file

@ -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()

View file

@ -84,7 +84,7 @@ class ConferencesBrowseFragment : BrowseSupportFragment() {
rowsAdapter.add(conferencesSection)
onItemViewClickedListener = ItemViewClickedListener(this){
onItemViewClickedListener = ItemViewClickedListener(this) {
viewModel.updateLiveStreams()
}
adapter = rowsAdapter

View file

@ -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)