[Android] Video player options: Fix options display glitch
Geoffrey Métais
git at videolan.org
Thu Jul 11 13:16:41 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 11 13:09:47 2019 +0200| [d79dbb68bc4299a41dcd1079cee9b762a61d1350] | committer: Geoffrey Métais
Video player options: Fix options display glitch
DiffUtill was not detecting identical items correctly
> https://code.videolan.org/videolan/vlc-android/commit/d79dbb68bc4299a41dcd1079cee9b762a61d1350
---
vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
index 43560a104..6fd1c98da 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
@@ -26,7 +26,6 @@ import androidx.recyclerview.widget.RecyclerView
import kotlinx.coroutines.*
import org.videolan.vlc.PlaybackService
import org.videolan.vlc.R
-import org.videolan.vlc.VLCApplication
import org.videolan.vlc.databinding.PlayerOptionItemBinding
import org.videolan.vlc.gui.DiffUtilAdapter
import org.videolan.vlc.gui.audio.EqualizerFragment
@@ -133,7 +132,6 @@ class PlayerOptionsDelegate(val activity: AppCompatActivity, val service: Playba
if (flags and CTX_DOWNLOAD_SUBTITLES_PLAYER != 0) options.add(PlayerOption(playerOptionType, CTX_DOWNLOAD_SUBTITLES_PLAYER, R.drawable.ic_downsub_w, res.getString(R.string.download_subtitles)))
}
}
-
(recyclerview.adapter as OptionsAdapter).update(options)
}
@@ -435,7 +433,7 @@ fun Context.setSleep(time: Calendar?) {
PlayerOptionsDelegate.playerSleepTime = time
}
-class PlayerOption(val type: PlayerOptionType, val id: Int, val icon: Int, val title: String)
+data class PlayerOption(val type: PlayerOptionType, val id: Int, val icon: Int, val title: String)
enum class PlayerOptionType {
ADVANCED, MEDIA_TRACKS
More information about the Android
mailing list