Fix crash when reacting to release note channel messages.

fork-5.53.8
Cody Henthorne 2022-02-10 16:26:13 -05:00
rodzic c547553770
commit 233ba03f73
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -654,7 +654,7 @@ public final class ConversationReactionOverlay extends FrameLayout {
}
private void handleUpEvent() {
if (selected != -1 && onReactionSelectedListener != null) {
if (selected != -1 && onReactionSelectedListener != null && backgroundView.getVisibility() == View.VISIBLE) {
if (selected == customEmojiIndex) {
onReactionSelectedListener.onCustomReactionSelected(messageRecord, emojiViews[selected].getTag() != null);
} else {

Wyświetl plik

@ -17,6 +17,7 @@ import org.thoughtcrime.securesms.groups.GroupId;
import org.thoughtcrime.securesms.jobmanager.Data;
import org.thoughtcrime.securesms.jobmanager.Job;
import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.messages.GroupSendUtil;
import org.thoughtcrime.securesms.net.NotPushRegisteredException;
import org.thoughtcrime.securesms.recipients.Recipient;
@ -150,6 +151,10 @@ public class ReactionSendJob extends BaseJob {
Recipient targetAuthor = message.isOutgoing() ? Recipient.self() : message.getIndividualRecipient();
long targetSentTimestamp = message.getDateSent();
if (targetAuthor.getId().equals(SignalStore.releaseChannelValues().getReleaseChannelRecipientId())) {
return;
}
if (!remove && !reactionDatabase.hasReaction(messageId, reaction)) {
Log.w(TAG, "Went to add a reaction, but it's no longer present on the message!");
return;