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,26 +995,16 @@ class PlayerFragment :
|
||||||
) View.VISIBLE
|
) View.VISIBLE
|
||||||
else View.GONE
|
else View.GONE
|
||||||
|
|
||||||
var bitRate: String? = null
|
var bitRate: String = ""
|
||||||
if (currentSong!!.bitRate != null && currentSong!!.bitRate!! > 0)
|
if (currentSong!!.bitRate != null && currentSong!!.bitRate!! > 0)
|
||||||
bitRate = String.format(
|
bitRate = String.format(
|
||||||
Util.appContext().getString(R.string.song_details_kbps),
|
Util.appContext().getString(R.string.song_details_kbps),
|
||||||
currentSong!!.bitRate
|
currentSong!!.bitRate
|
||||||
)
|
)
|
||||||
bitrateFormatTextView.text =
|
bitrateFormatTextView.text = String.format(
|
||||||
String.format(
|
Locale.ROOT, "%s %s",
|
||||||
Util.appContext().getString(R.string.song_details_all),
|
bitRate, currentSong!!.suffix
|
||||||
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.visibility = View.VISIBLE
|
bitrateFormatTextView.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
genreTextView.visibility = View.GONE
|
genreTextView.visibility = View.GONE
|
||||||
|
|
Loading…
Reference in New Issue