Skip to content

Commit

Permalink
Fix bug where description would overwrite subtitle of conversation he…
Browse files Browse the repository at this point in the history
…ader.
  • Loading branch information
alex-signal committed Jan 4, 2024
1 parent f1ee168 commit 67ff089
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -14,6 +14,7 @@
import androidx.core.content.ContextCompat;

import org.signal.core.util.DimensionUnit;
import org.signal.core.util.StringUtil;
import org.signal.core.util.concurrent.SignalExecutors;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.components.emoji.EmojiTextView;
Expand Down Expand Up @@ -94,17 +95,22 @@ public void setAbout(@NonNull Recipient recipient) {
}

public void setSubtitle(@NonNull CharSequence subtitle, @DrawableRes int iconRes) {
if (TextUtils.isEmpty(subtitle)) {
hideSubtitle();
return;
}

binding.messageRequestSubtitle.setText(prependIcon(subtitle, iconRes));
binding.messageRequestSubtitle.setVisibility(View.VISIBLE);
}

public void setDescription(@Nullable CharSequence description, @DrawableRes int iconRes) {
if (description == null) {
if (TextUtils.isEmpty(description)) {
hideDescription();
return;
}

binding.messageRequestSubtitle.setText(prependIcon(description, iconRes));
binding.messageRequestDescription.setText(prependIcon(description, iconRes));
binding.messageRequestDescription.setVisibility(View.VISIBLE);
}

Expand Down
Expand Up @@ -622,7 +622,6 @@ class ConversationAdapterV2(
}
}
conversationBanner.setDescription(HtmlCompat.fromHtml(description, 0), R.drawable.symbol_group_light_20)
conversationBanner.showDescription()
}

if (recipient.isReleaseNotes) {
Expand Down

0 comments on commit 67ff089

Please sign in to comment.