Skip to content
Snippets Groups Projects
Commit d7e8d20c authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Fix play queue item when there is no subtitle and "stop after this" is enabled

parent f48e0d8c
No related branches found
No related tags found
1 merge request!1788Multiple fixes on the video player play queue
......@@ -31,6 +31,10 @@
name="scaleType"
type="android.widget.ImageView.ScaleType" />
<variable
name="stopAfterThis"
type="java.lang.Boolean" />
<variable
name="masked"
type="java.lang.Boolean" />
......@@ -136,7 +140,7 @@
android:text="@{subTitle}"
android:textColor="?attr/font_audio_light"
android:textSize="12sp"
android:visibility="@{TextUtils.isEmpty(subTitle) ? View.GONE : View.VISIBLE}"
android:visibility="@{TextUtils.isEmpty(subTitle) &amp;&amp; !stopAfterThis ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/stop_after"
app:layout_constraintHorizontal_bias="0.5"
......
......@@ -129,6 +129,7 @@ class PlaylistAdapter(private val player: IPlayer) : DiffUtilAdapter<MediaWrappe
holder.binding.subTitle = MediaUtils.getMediaSubtitle(media)
holder.binding.scaleType = ImageView.ScaleType.CENTER_CROP
holder.binding.stopAfter.visibility = if (stopAfter == position) View.VISIBLE else View.GONE
holder.binding.stopAfterThis = (position == stopAfter)
if (currentIndex == position) {
if (model?.playing != false) holder.binding.playing.start() else holder.binding.playing.stop()
holder.binding.playing.visibility = View.VISIBLE
......
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