mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-13 11:39:49 +00:00
Hide duration if unknown
This commit is contained in:
parent
5ede474253
commit
11992af81b
2 changed files with 15 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue