shorten onCurrentChanged() to 60 lines to not fail CI LongMethod
Signed-off-by: Holger Müller <github@euhm.de>
This commit is contained in:
parent
c247e930c4
commit
7b750c692c
|
@ -995,25 +995,15 @@ class PlayerFragment :
|
|||
) View.VISIBLE
|
||||
else View.GONE
|
||||
|
||||
var bitRate: String? = null
|
||||
var bitRate: String = ""
|
||||
if (currentSong!!.bitRate != null && currentSong!!.bitRate!! > 0)
|
||||
bitRate = String.format(
|
||||
Util.appContext().getString(R.string.song_details_kbps),
|
||||
currentSong!!.bitRate
|
||||
)
|
||||
bitrateFormatTextView.text =
|
||||
String.format(
|
||||
Util.appContext().getString(R.string.song_details_all),
|
||||
if (bitRate == null) ""
|
||||
else String.format(Locale.ROOT, "%s ", bitRate),
|
||||
if (TextUtils.isEmpty(currentSong!!.transcodedSuffix) ||
|
||||
currentSong!!.transcodedSuffix == currentSong!!.suffix ||
|
||||
currentSong!!.isVideo
|
||||
) currentSong!!.suffix
|
||||
else String.format(
|
||||
Locale.ROOT, "%s > %s", currentSong!!.suffix,
|
||||
currentSong!!.transcodedSuffix
|
||||
)
|
||||
bitrateFormatTextView.text = String.format(
|
||||
Locale.ROOT, "%s %s",
|
||||
bitRate, currentSong!!.suffix
|
||||
)
|
||||
bitrateFormatTextView.visibility = View.VISIBLE
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue