Small improvements to code quality and readability
Add annotations to methods and parameters. Replace Jetbrains' @NotNull with Androidx' @NonNull annotatiation. Make class variables static if possible. Use constants for some Strings. Simplify if conditions.
This commit is contained in:
parent
d71af9a625
commit
37b8a9375f
8 changed files with 44 additions and 39 deletions
|
|
@ -54,11 +54,9 @@ class ChannelItem(
|
|||
context.getString(R.string.subscribers_count_not_available)
|
||||
}
|
||||
|
||||
if (itemVersion == ItemVersion.NORMAL) {
|
||||
if (infoItem.streamCount >= 0) {
|
||||
val formattedVideoAmount = Localization.localizeStreamCount(context, infoItem.streamCount)
|
||||
details = Localization.concatenateStrings(details, formattedVideoAmount)
|
||||
}
|
||||
if (itemVersion == ItemVersion.NORMAL && infoItem.streamCount >= 0) {
|
||||
val formattedVideoAmount = Localization.localizeStreamCount(context, infoItem.streamCount)
|
||||
details = Localization.concatenateStrings(details, formattedVideoAmount)
|
||||
}
|
||||
return details
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue