From 6e4f002b6d483e520f6d7dc2f4a3ed22267975be Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Wed, 2 Jun 2021 14:34:34 -0300 Subject: [PATCH] Fix masking issue with multiselect highlighted items. --- .../securesms/conversation/ConversationItem.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java index 3c34e28858..ffd88c0542 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java @@ -725,7 +725,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo bodyBubble.setQuoteViewProjection(null); bodyBubble.setVideoPlayerProjection(null); - updateBackgroundDrawableProjections(); + updateSelectedBackgroundDrawableProjections(); if (eventListener != null && audioViewStub.resolved()) { Log.d(TAG, "setMediaAttributes: unregistering voice note callbacks for audio slide " + audioViewStub.get().getAudioSlideUri()); @@ -1469,7 +1469,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo if (mediaThumbnailStub != null && mediaThumbnailStub.resolved()) { mediaThumbnailStub.get().showThumbnailView(); bodyBubble.setVideoPlayerProjection(null); - updateBackgroundDrawableProjections(); + updateSelectedBackgroundDrawableProjections(); } } @@ -1479,7 +1479,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo mediaThumbnailStub.get().hideThumbnailView(); mediaThumbnailStub.get().getDrawingRect(thumbnailMaskingRect); bodyBubble.setVideoPlayerProjection(Projection.relativeToViewWithCommonRoot(mediaThumbnailStub.get(), bodyBubble, null)); - updateBackgroundDrawableProjections(); + updateSelectedBackgroundDrawableProjections(); } } @@ -1558,10 +1558,11 @@ public final class ConversationItem extends RelativeLayout implements BindableCo projections.add(quoteView.getProjection((ViewGroup) getRootView()).translateX(bodyBubble.getTranslationX())); } + updateSelectedBackgroundDrawableProjections(); return projections; } - private void updateBackgroundDrawableProjections() { + private void updateSelectedBackgroundDrawableProjections() { Set projections = Stream.of(bodyBubble.getProjections()) .map(p -> Projection.translateFromDescendantToParentCoords(p, bodyBubble, this)) .collect(Collectors.toSet()); @@ -1570,7 +1571,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo !hasNoBubble(messageRecord) && bodyBubbleCorners != null) { - projections.add(Projection.relativeToParent(this, bodyBubble, bodyBubbleCorners).translateX(bodyBubble.getTranslationX())); + projections.add(Projection.relativeToParent(this, bodyBubble, bodyBubbleCorners)); } backgroundDrawable.setProjections(projections);