From 92e9c9a762e14cb16e566fb62a5803a3b5f53a75 Mon Sep 17 00:00:00 2001 From: Ivan Kupalov Date: Thu, 16 Jan 2020 19:08:19 +0100 Subject: [PATCH] Fix setting text to CW button in fav/reblog notification. Fix #1641 (#1642) This is a regression from e5b78f65cf61f3ded18f2ded93cd57b8c0af42c9 --- .../keylesspalace/tusky/adapter/NotificationsAdapter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java index 6a5bc073..e018235e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java @@ -479,6 +479,11 @@ public class NotificationsAdapter extends RecyclerView.Adapter { boolean hasSpoiler = !TextUtils.isEmpty(statusViewData.getSpoilerText()); contentWarningDescriptionTextView.setVisibility(hasSpoiler ? View.VISIBLE : View.GONE); contentWarningButton.setVisibility(hasSpoiler ? View.VISIBLE : View.GONE); + if (statusViewData.isExpanded()) { + contentWarningButton.setText(R.string.status_content_warning_show_less); + } else { + contentWarningButton.setText(R.string.status_content_warning_show_more); + } contentWarningButton.setOnClickListener(view -> { if (getAdapterPosition() != RecyclerView.NO_POSITION) {