kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix outgoing quote over media.
rodzic
ce1983a3b1
commit
2412f6f63a
|
@ -1993,6 +1993,19 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||||
|
|
||||||
colorizerProjections.addAll(projections);
|
colorizerProjections.addAll(projections);
|
||||||
} else if (hasThumbnail(messageRecord) && mediaThumb != null) {
|
} else if (hasThumbnail(messageRecord) && mediaThumb != null) {
|
||||||
|
if (hasQuote(messageRecord) && quoteView != null) {
|
||||||
|
Projection quote = Projection.relativeToParent(coordinateRoot, bodyBubble, bodyBubbleCorners).translateX(bodyBubble.getTranslationX());
|
||||||
|
int quoteViewTop = (int) quote.getY();
|
||||||
|
int mediaTop = (int) mediaThumb.getY();
|
||||||
|
|
||||||
|
colorizerProjections.add(
|
||||||
|
quote.insetBottom(quote.getHeight() - (mediaTop - quoteViewTop))
|
||||||
|
.scale(bodyBubble.getScaleX())
|
||||||
|
.translateX(translationX)
|
||||||
|
.translateY(translationY)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
colorizerProjections.add(
|
colorizerProjections.add(
|
||||||
bodyBubbleToRoot.insetTop(mediaThumb.getHeight())
|
bodyBubbleToRoot.insetTop(mediaThumb.getHeight())
|
||||||
.scale(bodyBubble.getScaleX())
|
.scale(bodyBubble.getScaleX())
|
||||||
|
|
|
@ -131,6 +131,15 @@ public final class Projection {
|
||||||
return set(x, y + boundary, width, height - boundary, newCorners);
|
return set(x, y + boundary, width, height - boundary, newCorners);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public @NonNull Projection insetBottom(int boundary) {
|
||||||
|
Corners newCorners = this.corners == null ? null : new Corners(this.corners.topLeft,
|
||||||
|
this.corners.topRight,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
|
|
||||||
|
return set(x, y, width, height - boundary, newCorners);
|
||||||
|
}
|
||||||
|
|
||||||
public static @NonNull Projection relativeToParent(@NonNull ViewGroup parent, @NonNull View view, @Nullable Corners corners) {
|
public static @NonNull Projection relativeToParent(@NonNull ViewGroup parent, @NonNull View view, @Nullable Corners corners) {
|
||||||
Rect viewBounds = new Rect();
|
Rect viewBounds = new Rect();
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue