mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Hide duration if unknown
This commit is contained in:
+7
-1
@@ -95,7 +95,13 @@ class VideoListEditorViewHolder : ViewHolder {
|
||||
.into(_imageThumbnail);
|
||||
_textName.text = v.name;
|
||||
_textAuthor.text = v.author.name;
|
||||
_textVideoDuration.text = v.duration.toHumanTime(false);
|
||||
|
||||
if(v.duration > 0) {
|
||||
_textVideoDuration.text = v.duration.toHumanTime(false);
|
||||
_textVideoDuration.visibility = View.VISIBLE;
|
||||
}
|
||||
else
|
||||
_textVideoDuration.visibility = View.GONE;
|
||||
|
||||
val historyPosition = StateHistory.instance.getHistoryPosition(v.url)
|
||||
_timeBar.progress = historyPosition.toFloat() / v.duration.toFloat();
|
||||
|
||||
+8
-2
@@ -204,8 +204,14 @@ open class PreviewVideoView : LinearLayout {
|
||||
.into(_imageVideo);
|
||||
};
|
||||
|
||||
if(!isPlanned)
|
||||
_textVideoDuration.text = video.duration.toHumanTime(false);
|
||||
if(!isPlanned) {
|
||||
if(video.duration > 0) {
|
||||
_textVideoDuration.text = video.duration.toHumanTime(false);
|
||||
_textVideoDuration.visibility = View.VISIBLE;
|
||||
}
|
||||
else
|
||||
_textVideoDuration.visibility = View.GONE;
|
||||
}
|
||||
else
|
||||
_textVideoDuration.text = context.getString(R.string.planned);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user