do not restrain embedded message size to outer message size

This commit is contained in:
Daniel Gultsch 2023-04-01 11:39:30 +02:00
parent 9127d68197
commit e6bf595388
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
3 changed files with 11 additions and 0 deletions

View file

@ -43,8 +43,10 @@
android:padding="8dp"
android:visibility="@{message.hasInReplyTo ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_min="wrap"
tools:visibility="visible">
<TextView
@ -70,6 +72,8 @@
tools:text="11:23 PM" />
<TextView
android:maxLines="@integer/embedded_message_max_lines"
android:ellipsize="end"
android:id="@+id/embeddedMessageText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -120,6 +124,7 @@
android:visibility="@{message.hasTextContent ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/downloadButton">

View file

@ -32,8 +32,10 @@
android:padding="8dp"
android:visibility="@{message.hasInReplyTo ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_min="wrap"
tools:visibility="visible">
<TextView
@ -63,6 +65,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4sp"
android:ellipsize="end"
android:maxLines="@integer/embedded_message_max_lines"
android:text="@{message.inReplyToTextContent}"
android:textAppearance="?textAppearanceBodySmall"
android:textColor="?colorOnPrimaryContainer"
@ -109,6 +113,7 @@
android:visibility="@{message.hasTextContent ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/downloadButton">

View file

@ -8,4 +8,5 @@
always be restricted to max_preview_width. -->
<dimen name="message_preview_max_width">384dp</dimen>
<dimen name="message_preview_max_height">256dp</dimen>
<integer name="embedded_message_max_lines">3</integer>
</resources>