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

History: network icon display when network scheme

Now that the network icon is used for network files and not external
files, it should use isSchemeNetwork to be displayed and not
!isSchemeFile.
parent d93b91f1
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ import org.videolan.vlc.interfaces.IListEventsHandler
import org.videolan.vlc.interfaces.SwipeDragHelperAdapter
import org.videolan.vlc.util.isOTG
import org.videolan.vlc.util.isSD
import org.videolan.vlc.util.isSchemeFile
import org.videolan.vlc.util.isSchemeNetwork
class HistoryAdapter(private val inCards: Boolean = false, private val listEventsHandler: IListEventsHandler? = null) : DiffUtilAdapter<MediaWrapper, HistoryAdapter.ViewHolder>(),
MultiSelectAdapter<MediaWrapper>, IEventsSource<Click> by EventsSource(), SwipeDragHelperAdapter {
......@@ -112,7 +113,7 @@ class HistoryAdapter(private val inCards: Boolean = false, private val listEvent
when (holder.binding) {
is HistoryItemBinding -> {
(holder.binding as HistoryItemBinding).media = media
holder.binding.setVariable(BR.isNetwork, !media.uri.scheme.isSchemeFile())
holder.binding.setVariable(BR.isNetwork, media.uri.scheme.isSchemeNetwork())
holder.binding.setVariable(BR.isSD, media.uri.isSD())
holder.binding.setVariable(BR.isOTG, media.uri.isOTG())
(holder.binding as HistoryItemBinding).cover = getMediaIconDrawable(holder.itemView.context, media.type)
......@@ -120,7 +121,7 @@ class HistoryAdapter(private val inCards: Boolean = false, private val listEvent
}
is HistoryItemCardBinding -> {
(holder.binding as HistoryItemCardBinding).media = media
holder.binding.setVariable(BR.isNetwork, !media.uri.scheme.isSchemeFile())
holder.binding.setVariable(BR.isNetwork, media.uri.scheme.isSchemeNetwork())
holder.binding.setVariable(BR.isSD, media.uri.isSD())
holder.binding.setVariable(BR.isOTG, media.uri.isOTG())
(holder.binding as HistoryItemCardBinding).cover = getMediaIconDrawable(holder.itemView.context, media.type)
......
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