Skip to content
Snippets Groups Projects
Commit 19792df7 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Videos: Clear list views

Some elements could persist when switching from a grouping option to
another
parent 13eed703
No related branches found
No related tags found
No related merge requests found
Pipeline #10039 passed with stage
in 26 minutes and 52 seconds
......@@ -154,11 +154,17 @@ class VideoListAdapter internal constructor(
val count = withContext(Dispatchers.IO) { item.mediaCount(AbstractFolder.TYPE_FOLDER_VIDEO) }
holder.binding.setVariable(BR.time, holder.itemView.context.resources.getQuantityString(R.plurals.videos_quantity, count, count))
holder.title.text = item.title
if (!isListMode) holder.binding.setVariable(BR.resolution, null)
holder.binding.setVariable(BR.seen, 0L)
holder.binding.setVariable(BR.max, 0)
}
is AbstractVideoGroup -> launch {
val count = item.mediaCount()
holder.binding.setVariable(BR.time, if (count < 2) null else holder.itemView.context.resources.getQuantityString(R.plurals.videos_quantity, count, count))
holder.title.text = item.title
if (!isListMode) holder.binding.setVariable(BR.resolution, null)
holder.binding.setVariable(BR.seen, 0L)
holder.binding.setVariable(BR.max, 0)
}
is AbstractMediaWrapper -> {
holder.title.text = if (showFilename.get()) item.fileName else item.title
......
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