Remove gradient support from api 19.

This commit is contained in:
Alex Hart
2021-05-26 19:52:56 -03:00
committed by Cody Henthorne
parent 35930fb23a
commit 273e5f9168
10 changed files with 85 additions and 45 deletions

View File

@@ -164,10 +164,9 @@ public class InputPanel extends LinearLayout
long id,
@NonNull Recipient author,
@NonNull CharSequence body,
@NonNull SlideDeck attachments,
@NonNull Colorizer colorizer)
@NonNull SlideDeck attachments)
{
this.quoteView.setQuote(glideRequests, id, author, body, false, attachments, colorizer);
this.quoteView.setQuote(glideRequests, id, author, body, false, attachments, null);
int originalHeight = this.quoteView.getVisibility() == VISIBLE ? this.quoteView.getMeasuredHeight()
: 0;

View File

@@ -26,7 +26,7 @@ import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.attachments.Attachment;
import org.thoughtcrime.securesms.components.mention.MentionAnnotation;
import org.thoughtcrime.securesms.conversation.colors.Colorizer;
import org.thoughtcrime.securesms.conversation.colors.ChatColors;
import org.thoughtcrime.securesms.database.model.Mention;
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri;
import org.thoughtcrime.securesms.mms.GlideRequests;
@@ -69,7 +69,6 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
private int largeCornerRadius;
private int smallCornerRadius;
private CornerMask cornerMask;
private Colorizer colorizer;
public QuoteView(Context context) {
@@ -157,7 +156,7 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
@Nullable CharSequence body,
boolean originalMissing,
@NonNull SlideDeck attachments,
@NonNull Colorizer colorizer)
@Nullable ChatColors chatColors)
{
if (this.author != null) this.author.removeForeverObserver(this);
@@ -165,13 +164,18 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
this.author = author.live();
this.body = body;
this.attachments = attachments;
this.colorizer = colorizer;
this.author.observeForever(this);
setQuoteAuthor(author);
setQuoteText(body, attachments);
setQuoteAttachment(glideRequests, attachments);
setQuoteMissingFooter(originalMissing);
if (Build.VERSION.SDK_INT < 21 && messageType == MESSAGE_TYPE_INCOMING && chatColors != null) {
this.setBackgroundColor(chatColors.asSingleColor());
} else {
this.setBackground(null);
}
}
public void setTopCornerSizes(boolean topLeftLarge, boolean topRightLarge) {