fix hasSpoiler condition in StatusNotificationViewHolder
This commit is contained in:
parent
0dde036049
commit
cbd9f06fe9
|
@ -270,7 +270,7 @@ internal class StatusNotificationViewHolder(
|
||||||
)
|
)
|
||||||
binding.notificationTopText.text = emojifiedText
|
binding.notificationTopText.text = emojifiedText
|
||||||
if (statusViewData != null) {
|
if (statusViewData != null) {
|
||||||
val hasSpoiler = statusViewData.status.spoilerText.isEmpty()
|
val hasSpoiler = statusViewData.status.spoilerText.isNotEmpty()
|
||||||
binding.notificationContentWarningDescription.visibility =
|
binding.notificationContentWarningDescription.visibility =
|
||||||
if (hasSpoiler) View.VISIBLE else View.GONE
|
if (hasSpoiler) View.VISIBLE else View.GONE
|
||||||
binding.notificationContentWarningButton.visibility =
|
binding.notificationContentWarningButton.visibility =
|
||||||
|
@ -304,7 +304,7 @@ internal class StatusNotificationViewHolder(
|
||||||
animateEmojis: Boolean
|
animateEmojis: Boolean
|
||||||
) {
|
) {
|
||||||
val shouldShowContentIfSpoiler = statusViewData.isExpanded
|
val shouldShowContentIfSpoiler = statusViewData.isExpanded
|
||||||
val hasSpoiler = statusViewData.status.spoilerText.isEmpty()
|
val hasSpoiler = statusViewData.status.spoilerText.isNotEmpty()
|
||||||
if (!shouldShowContentIfSpoiler && hasSpoiler) {
|
if (!shouldShowContentIfSpoiler && hasSpoiler) {
|
||||||
binding.notificationContent.visibility = View.GONE
|
binding.notificationContent.visibility = View.GONE
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue