mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-05 21:07:49 +01:00
Fix story quote author name truncation.
This commit is contained in:
committed by
Alex Hart
parent
ed754c1d30
commit
9e12fd7e39
@@ -322,7 +322,7 @@ public class QuoteView extends ConstraintLayout implements RecipientForeverObser
|
||||
if (storyReaction != null) {
|
||||
storyReactionEmoji.setImageEmoji(storyReaction);
|
||||
storyReactionEmoji.setVisibility(View.VISIBLE);
|
||||
missingStoryReaction.setVisibility(View.INVISIBLE);
|
||||
missingStoryReaction.setVisibility(View.GONE);
|
||||
} else {
|
||||
storyReactionEmoji.setVisibility(View.GONE);
|
||||
missingStoryReaction.setVisibility(View.GONE);
|
||||
|
||||
+10
-9
@@ -80,6 +80,16 @@ class V2ConversationItemMediaViewHolder<Model : MappingModel<Model>>(
|
||||
}
|
||||
|
||||
binding.quoteStub.visibility = View.VISIBLE
|
||||
|
||||
quoteView.setMessageType(
|
||||
when {
|
||||
conversationMessage.messageRecord.isStoryReaction() && binding.textBridge.isIncoming -> QuoteView.MessageType.STORY_REPLY_INCOMING
|
||||
conversationMessage.messageRecord.isStoryReaction() -> QuoteView.MessageType.STORY_REPLY_OUTGOING
|
||||
binding.textBridge.isIncoming -> QuoteView.MessageType.INCOMING
|
||||
else -> QuoteView.MessageType.OUTGOING
|
||||
}
|
||||
)
|
||||
|
||||
quoteView.setQuote(
|
||||
conversationContext.requestManager,
|
||||
quote.id,
|
||||
@@ -93,15 +103,6 @@ class V2ConversationItemMediaViewHolder<Model : MappingModel<Model>>(
|
||||
conversationMessage.quoteMemberLabel
|
||||
)
|
||||
|
||||
quoteView.setMessageType(
|
||||
when {
|
||||
conversationMessage.messageRecord.isStoryReaction() && binding.textBridge.isIncoming -> QuoteView.MessageType.STORY_REPLY_INCOMING
|
||||
conversationMessage.messageRecord.isStoryReaction() -> QuoteView.MessageType.STORY_REPLY_OUTGOING
|
||||
binding.textBridge.isIncoming -> QuoteView.MessageType.INCOMING
|
||||
else -> QuoteView.MessageType.OUTGOING
|
||||
}
|
||||
)
|
||||
|
||||
quoteView.setWallpaperEnabled(conversationContext.hasWallpaper())
|
||||
quoteView.setTextSize(TypedValue.COMPLEX_UNIT_SP, SignalStore.settings.getMessageQuoteFontSize(context).toFloat())
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/quote_attachment_name_stub"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_missing_story_reaction_emoji"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_author_end_barrier"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/quote_bar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -52,7 +52,7 @@
|
||||
android:inflatedId="@id/quote_attachment_name_stub"
|
||||
android:layout="@layout/v2_quote_view_attachment_name_stub"
|
||||
app:layout_constraintBottom_toTopOf="@id/media_type"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_missing_story_reaction_emoji"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_body_end_barrier"
|
||||
app:layout_constraintStart_toEndOf="@id/quote_bar"
|
||||
app:layout_constraintTop_toBottomOf="@id/quote_author_holder"
|
||||
app:layout_constraintWidth_default="spread"
|
||||
@@ -69,7 +69,7 @@
|
||||
android:textColor="@color/core_black"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/quote_text"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_missing_story_reaction_emoji"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_body_end_barrier"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/quote_bar"
|
||||
app:layout_constraintTop_toBottomOf="@id/quote_attachment_name_stub"
|
||||
@@ -91,7 +91,7 @@
|
||||
app:emoji_renderSpoilers="true"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/content_barrier"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_missing_story_reaction_emoji"
|
||||
app:layout_constraintEnd_toStartOf="@id/quote_body_end_barrier"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/quote_bar"
|
||||
app:layout_constraintTop_toBottomOf="@id/media_type"
|
||||
@@ -144,6 +144,22 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- Author sits at the top of the quote, so it only needs to clear the views anchored there. -->
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/quote_author_end_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="start"
|
||||
app:constraint_referenced_ids="quote_thumbnail,quote_dismiss_stub,quote_missing_story_reaction_emoji" />
|
||||
|
||||
<!-- Body content can reach the bottom of the quote, where the story reaction emoji floats over it. -->
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/quote_body_end_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="start"
|
||||
app:constraint_referenced_ids="quote_thumbnail,quote_dismiss_stub,quote_missing_story_reaction_emoji,quote_story_reaction_emoji" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/content_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user