Don't cut the document icon in quotes

I also deleted an unnecessary LinearLayout, so you should look at the
diff with --ignore-all-space

Firstly, I lifted quote_attachment_container out of the FrameLayout with
the thumbnail so that quote_attachment_container can be wrap_content
(and enlarge the quote if necessary) while the thumbnail still always
matches the size of the quote.

Then I made the document view itself a little smaller so it does not
enlarge the quote all the times.
This commit is contained in:
Hocuri 2020-11-08 12:34:04 +01:00
parent 90af180ce4
commit 778718c7b2
No known key found for this signature in database
GPG key ID: 0D45AD9007D18DCD
2 changed files with 101 additions and 117 deletions

View file

@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.components;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
@ -111,6 +110,11 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
typedArray.recycle();
dismissView.setVisibility(messageType == MESSAGE_TYPE_PREVIEW ? VISIBLE : GONE);
if (messageType == MESSAGE_TYPE_PREVIEW) {
bodyView.setSingleLine();
} else {
bodyView.setMaxLines(3);
}
// if (messageType == MESSAGE_TYPE_PREVIEW) {
// int radius = getResources().getDimensionPixelOffset(R.dimen.quote_corner_radius_preview);