mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Fix crash when a channel doesn't have a description
This commit is contained in:
parent
451320b7de
commit
2b446d5b0f
@ -8,7 +8,7 @@ data class Channel(
|
|||||||
val name: String? = null,
|
val name: String? = null,
|
||||||
val avatarUrl: String? = null,
|
val avatarUrl: String? = null,
|
||||||
val bannerUrl: String? = null,
|
val bannerUrl: String? = null,
|
||||||
val description: String = "",
|
val description: String? = null,
|
||||||
val nextpage: String? = null,
|
val nextpage: String? = null,
|
||||||
val subscriberCount: Long = 0,
|
val subscriberCount: Long = 0,
|
||||||
val verified: Boolean = false,
|
val verified: Boolean = false,
|
||||||
|
@ -172,10 +172,10 @@ class ChannelFragment : Fragment() {
|
|||||||
R.string.subscribers,
|
R.string.subscribers,
|
||||||
response.subscriberCount.formatShort()
|
response.subscriberCount.formatShort()
|
||||||
)
|
)
|
||||||
if (response.description.isBlank()) {
|
if (response.description.orEmpty().isBlank()) {
|
||||||
binding.channelDescription.visibility = View.GONE
|
binding.channelDescription.visibility = View.GONE
|
||||||
} else {
|
} else {
|
||||||
binding.channelDescription.text = response.description.trim()
|
binding.channelDescription.text = response.description.orEmpty().trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.channelDescription.setOnClickListener {
|
binding.channelDescription.setOnClickListener {
|
||||||
|
Loading…
Reference in New Issue
Block a user