Skip to content

Commit

Permalink
Hide header decoration when in the release notes chat.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal committed Jan 4, 2024
1 parent 5fef60c commit f1ee168
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public void setLinkifyDescription(boolean enable) {
binding.messageRequestDescription.setMovementMethod(enable ? LongClickMovementMethod.getInstance(getContext()) : null);
}

public void hideDecorations() {
binding.messageRequestInfoOutline.setVisibility(View.GONE);
binding.messageRequestDivider.setVisibility(View.GONE);
}

private @NonNull CharSequence prependIcon(@NonNull CharSequence input, @DrawableRes int iconRes) {
Drawable drawable = ContextCompat.getDrawable(getContext(), iconRes);
Preconditions.checkNotNull(drawable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ class ConversationAdapterV2(
conversationBanner.setDescription(HtmlCompat.fromHtml(description, 0), R.drawable.symbol_group_light_20)
conversationBanner.showDescription()
}

if (recipient.isReleaseNotes) {
conversationBanner.hideDecorations()
}
}
}

Expand Down

0 comments on commit f1ee168

Please sign in to comment.