Fix split second spoiler reveal when quoting a message with a spoiler.

This commit is contained in:
Cody Henthorne
2023-05-19 12:42:52 -04:00
committed by Greyson Parrelli
parent 131f9c4bc9
commit f2846efd2c
9 changed files with 34 additions and 51 deletions

View File

@@ -1,6 +1,7 @@
package org.thoughtcrime.securesms.util;
import android.content.Context;
import android.graphics.Color;
import android.text.TextPaint;
import android.text.style.URLSpan;
import android.view.View;
@@ -41,6 +42,10 @@ public class LongClickCopySpan extends URLSpan {
@Override
public void updateDrawState(@NonNull TextPaint ds) {
if (ds.getColor() == Color.TRANSPARENT) {
return;
}
super.updateDrawState(ds);
if (textColor != null) {
ds.setColor(textColor);