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

Improve text when no video is available

parent d97b4da7
No related branches found
No related tags found
1 merge request!1309New external medias UX design
Pipeline #209722 passed with stage
in 5 minutes and 9 seconds
......@@ -940,6 +940,7 @@
<string name="touch_only_description">Switching to the mobile interface can only be done with a tactile screen or a mouse.\nPlease slide below to verify that this feature is safe to change.</string>
<string name="no_web_browser">No web browser installed</string>
<string name="no_web_browser_message">You can scan this on your smartphone.\nThe URL is %s</string>
<string name="no_video">No video available</string>
<string name="fold_optimized">Optimized for your folding screen</string>
<string name="fold_optimize">Optimize for folding screens</string>
<string name="foldable">Foldable screen</string>
......
......@@ -141,10 +141,10 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean
}
is VideoGroup -> holder.itemView.scope.launch {
val count = item.mediaCount()
holder.binding.setVariable(BR.time, if (count < 2) null else if (item.presentCount == item.mediaCount()) holder.itemView.context.resources.getQuantityString(R.plurals.videos_quantity, count, count) else item.getPresenceDescription())
holder.binding.setVariable(BR.time, if (count < 2) null else if (item.presentCount == item.mediaCount()) holder.itemView.context.resources.getQuantityString(R.plurals.videos_quantity, count, count) else if(item.presentCount == 0) holder.itemView.context.resources.getString(R.string.no_video) else item.getPresenceDescription())
holder.title.text = item.title
if (!isListMode) holder.binding.setVariable(BR.resolution, null)
val seen = if (item.presentSeen == item.presentCount) 1L else 0L
val seen = if (item.presentSeen == item.presentCount && item.presentCount != 0) 1L else 0L
holder.binding.setVariable(BR.seen, seen)
holder.binding.setVariable(BR.max, 0)
holder.binding.setVariable(BR.isPresent, item.presentCount > 0)
......
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