From d4ef19b9cf69f999fa466fa8c22b2a5d7ce6708b Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 25 Nov 2020 10:45:41 +0100 Subject: [PATCH] remove dead code --- .../securesms/components/QuoteView.java | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/src/org/thoughtcrime/securesms/components/QuoteView.java b/src/org/thoughtcrime/securesms/components/QuoteView.java index cf21c718c..4e7690753 100644 --- a/src/org/thoughtcrime/securesms/components/QuoteView.java +++ b/src/org/thoughtcrime/securesms/components/QuoteView.java @@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.components; import android.content.Context; import android.content.res.TypedArray; -import android.graphics.Color; import android.net.Uri; import android.os.Build; import android.text.TextUtils; @@ -41,8 +40,6 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { private static final String TAG = QuoteView.class.getSimpleName(); private static final int MESSAGE_TYPE_PREVIEW = 0; - private static final int MESSAGE_TYPE_OUTGOING = 1; - private static final int MESSAGE_TYPE_INCOMING = 2; private ViewGroup mainView; private TextView authorView; @@ -56,13 +53,8 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { private DcMsg quotedMsg; private DcContact author; private CharSequence body; - //private TextView missingLinkText; private SlideDeck attachments; private int messageType; - private int largeCornerRadius; - private int smallCornerRadius; -// private CornerMask cornerMask; - public QuoteView(Context context) { super(context); @@ -96,16 +88,9 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { this.attachmentVideoOverlayView = findViewById(R.id.quote_video_overlay); this.attachmentContainerView = findViewById(R.id.quote_attachment_container); this.dismissView = findViewById(R.id.quote_dismiss); -// this.largeCornerRadius = getResources().getDimensionPixelSize(R.dimen.quote_corner_radius_large); -// this.smallCornerRadius = getResources().getDimensionPixelSize(R.dimen.quote_corner_radius_bottom); - -// cornerMask = new CornerMask(this); -// cornerMask.setRadii(largeCornerRadius, largeCornerRadius, smallCornerRadius, smallCornerRadius); if (attrs != null) { TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.QuoteView, 0, 0); - int primaryColor = typedArray.getColor(R.styleable.QuoteView_quote_colorPrimary, Color.BLACK); - int secondaryColor = typedArray.getColor(R.styleable.QuoteView_quote_colorSecondary, Color.BLACK); messageType = typedArray.getInt(R.styleable.QuoteView_message_type, 0); typedArray.recycle(); @@ -115,27 +100,14 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { } else { bodyView.setMaxLines(3); } - -// if (messageType == MESSAGE_TYPE_PREVIEW) { -// int radius = getResources().getDimensionPixelOffset(R.dimen.quote_corner_radius_preview); -// cornerMask.setTopLeftRadius(radius); -// cornerMask.setTopRightRadius(radius); -// } } dismissView.setOnClickListener(view -> setVisibility(GONE)); } -// -// @Override -// protected void dispatchDraw(Canvas canvas) { -// super.dispatchDraw(canvas); -// cornerMask.mask(canvas); -// } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); - //if (author != null) author.removeForeverObserver(this); } public void setQuote(GlideRequests glideRequests, @@ -144,28 +116,17 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { @Nullable CharSequence body, @NonNull SlideDeck attachments) { -// if (this.author != null) this.author.removeForeverObserver(this); - quotedMsg = msg; this.author = author != null ? author.getDcContact() : null; this.body = body; this.attachments = attachments; - //this.author.observeForever(this); setQuoteAuthor(author); setQuoteText(body, attachments); setQuoteAttachment(glideRequests, attachments); - //setQuoteMissingFooter(originalMissing); } -// public void setTopCornerSizes(boolean topLeftLarge, boolean topRightLarge) { -// cornerMask.setTopLeftRadius(topLeftLarge ? largeCornerRadius : smallCornerRadius); -// cornerMask.setTopRightRadius(topRightLarge ? largeCornerRadius : smallCornerRadius); -// } - public void dismiss() { - //if (this.author != null) this.author.removeForeverObserver(this); - this.author = null; this.body = null; @@ -240,11 +201,6 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver { dismissView.setBackgroundResource(R.drawable.circle_alpha); } } -// -// private void setQuoteMissingFooter(boolean missing) { -// footerView.setVisibility(missing ? VISIBLE : GONE); -// footerView.setBackgroundColor(author.getColor()); -// } public CharSequence getBody() { return body;