mirror of
https://github.com/videolan/vlc-android
synced 2024-12-04 15:23:51 +08:00
VlcMigration: fix move obsolete version helpers
On 757baf3435
I forgot two instances.
This commit is contained in:
parent
145bbb8a02
commit
c8ffdc2cfb
@ -38,6 +38,7 @@ import org.videolan.medialibrary.media.MediaLibraryItem
|
||||
import org.videolan.resources.AndroidDevices
|
||||
import org.videolan.tools.isStarted
|
||||
import org.videolan.vlc.R
|
||||
import org.videolan.vlc.VlcMigrationHelper
|
||||
import org.videolan.vlc.databinding.ContextItemBinding
|
||||
import org.videolan.vlc.databinding.ContextualSheetBinding
|
||||
import org.videolan.vlc.util.ContextOption
|
||||
@ -111,6 +112,7 @@ class ContextSheet : VLCBottomSheetDialogFragment() {
|
||||
}
|
||||
|
||||
private fun populateMenuItems(flags: FlagSet<ContextOption>) = mutableListOf<CtxMenuItem>().apply {
|
||||
|
||||
if (flags.contains(CTX_PLAY)) add(Simple(CTX_PLAY, getString(R.string.play), R.drawable.ic_play))
|
||||
if (flags.contains(CTX_PLAY_SHUFFLE)) add(Simple(CTX_PLAY_SHUFFLE, getString(R.string.shuffle_play), R.drawable.ic_shuffle))
|
||||
if (flags.contains(CTX_PLAY_FROM_START)) add(Simple(CTX_PLAY_FROM_START, getString(R.string.play_from_start), R.drawable.ic_play_from_start))
|
||||
@ -118,7 +120,7 @@ class ContextSheet : VLCBottomSheetDialogFragment() {
|
||||
if (flags.contains(CTX_PLAY_AS_AUDIO)) add(Simple(CTX_PLAY_AS_AUDIO, getString(R.string.play_as_audio), R.drawable.ic_play_as_audio))
|
||||
if (flags.contains(CTX_APPEND)) add(Simple(CTX_APPEND, getString(R.string.append), R.drawable.ic_play_append))
|
||||
if (flags.contains(CTX_PLAY_NEXT)) add(Simple(CTX_PLAY_NEXT, getString(R.string.insert_next), R.drawable.ic_play_next))
|
||||
if (flags.contains(CTX_DOWNLOAD_SUBTITLES) && AndroidUtil.isLolliPopOrLater) add(Simple(CTX_DOWNLOAD_SUBTITLES, getString(R.string.download_subtitles), R.drawable.ic_download_subtitles))
|
||||
if (flags.contains(CTX_DOWNLOAD_SUBTITLES) && VlcMigrationHelper.isLolliPopOrLater) add(Simple(CTX_DOWNLOAD_SUBTITLES, getString(R.string.download_subtitles), R.drawable.ic_download_subtitles))
|
||||
if (flags.contains(CTX_INFORMATION)) add(Simple(CTX_INFORMATION, getString(R.string.info), R.drawable.ic_information))
|
||||
if (flags.contains(CTX_GO_TO_ALBUM)) add(Simple(CTX_GO_TO_ALBUM, getString(R.string.go_to_album), R.drawable.ic_album))
|
||||
if (flags.contains(CTX_GO_TO_ARTIST)) add(Simple(CTX_GO_TO_ARTIST, getString(R.string.go_to_artist), R.drawable.ic_no_artist))
|
||||
|
@ -45,6 +45,7 @@ import org.videolan.tools.setGone
|
||||
import org.videolan.tools.setVisible
|
||||
import org.videolan.vlc.PlaybackService
|
||||
import org.videolan.vlc.R
|
||||
import org.videolan.vlc.VlcMigrationHelper
|
||||
import org.videolan.vlc.databinding.PlayerOverlayTracksBinding
|
||||
import org.videolan.vlc.getDisableTrack
|
||||
import org.videolan.vlc.gui.dialogs.adapters.TrackAdapter
|
||||
@ -162,7 +163,7 @@ class VideoTracksDialog : VLCBottomSheetDialogFragment() {
|
||||
generateSeparator(binding.subtitleTracks.options)
|
||||
generateOptionItem(binding.subtitleTracks.options, getString(R.string.spu_delay), R.drawable.ic_delay, VideoTrackOption.SUB_DELAY)
|
||||
generateOptionItem(binding.subtitleTracks.options, getString(R.string.subtitle_select), R.drawable.ic_subtitles_file, VideoTrackOption.SUB_PICK)
|
||||
if (AndroidUtil.isLolliPopOrLater) generateOptionItem(binding.subtitleTracks.options, getString(R.string.download_subtitles), R.drawable.ic_download_subtitles, VideoTrackOption.SUB_DOWNLOAD)
|
||||
if (VlcMigrationHelper.isLolliPopOrLater) generateOptionItem(binding.subtitleTracks.options, getString(R.string.download_subtitles), R.drawable.ic_download_subtitles, VideoTrackOption.SUB_DOWNLOAD)
|
||||
generateSeparator(binding.subtitleTracks.options, true)
|
||||
binding.subtitleTracks.options.setAnimationUpdateListener {
|
||||
binding.subtitleTracks.trackMore.rotation = if (binding.subtitleTracks.options.isCollapsed) 180F - (180F * it) else 180F * it
|
||||
|
Loading…
Reference in New Issue
Block a user