mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +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 avatarUrl: String? = null,
|
||||
val bannerUrl: String? = null,
|
||||
val description: String = "",
|
||||
val description: String? = null,
|
||||
val nextpage: String? = null,
|
||||
val subscriberCount: Long = 0,
|
||||
val verified: Boolean = false,
|
||||
|
@ -172,10 +172,10 @@ class ChannelFragment : Fragment() {
|
||||
R.string.subscribers,
|
||||
response.subscriberCount.formatShort()
|
||||
)
|
||||
if (response.description.isBlank()) {
|
||||
if (response.description.orEmpty().isBlank()) {
|
||||
binding.channelDescription.visibility = View.GONE
|
||||
} else {
|
||||
binding.channelDescription.text = response.description.trim()
|
||||
binding.channelDescription.text = response.description.orEmpty().trim()
|
||||
}
|
||||
|
||||
binding.channelDescription.setOnClickListener {
|
||||
|
Loading…
Reference in New Issue
Block a user