Merge pull request #2864 from Bnyro/master

Show whole title when description visible
This commit is contained in:
Bnyro 2023-01-24 20:05:44 +01:00 committed by GitHub
commit 339f66ca0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,6 +531,9 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
binding.playerDescriptionArrow.animate().rotation(0F).setDuration(250).start()
binding.descLinLayout.visibility = View.GONE
// limit the title height to two lines
binding.playerTitle.maxLines = 2
// show formatted short view count
viewInfo = getString(R.string.views, streams.views.formatShort()) + viewInfo
} else {
@ -538,6 +541,9 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
binding.playerDescriptionArrow.animate().rotation(180F).setDuration(250).start()
binding.descLinLayout.visibility = View.VISIBLE
// show the whole title
binding.playerTitle.maxLines = Int.MAX_VALUE
// show exact view count
viewInfo = getString(R.string.views, String.format("%,d", streams.views)) + viewInfo
}