Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c08e338 authored by Julia Reynolds's avatar Julia Reynolds Committed by Automerger Merge Worker
Browse files

Merge "Fix crash when comparing messages" am: 42a3c415 am: ffa3b1c8

parents b15887e0 ffa3b1c8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -68,6 +68,10 @@ public interface MessagingMessage extends MessagingLinearLayout.MessagingChild {

    default boolean sameAs(Notification.MessagingStyle.Message message) {
        Notification.MessagingStyle.Message ownMessage = getMessage();
        // We have to make sure both messages are not null to go further comparison
        if (message == null || ownMessage == null) {
            return message == ownMessage;
        }
        if (!Objects.equals(message.getText(), ownMessage.getText())) {
            return false;
        }