~singpolyma/cheogram-android

6a709a123cf99d832f1424f13553be7ff5214712 — Stephen Paul Weber 8 months ago 8fe0c36
Show only one moderated message for a big streak of them
1 files changed, 3 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/entities/Message.java
M src/main/java/eu/siacs/conversations/entities/Message.java => src/main/java/eu/siacs/conversations/entities/Message.java +3 -1
@@ 927,6 927,7 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable 
                        (this.getSubject() == null || this.getSubject().equals(message.getSubject())) &&
                        (this.getThread() == null || (message.getThread() != null && this.getThread().toString().equals(message.getThread().toString()))) &&
                        this.getBody().length() + message.getBody().length() <= Config.MAX_DISPLAY_MESSAGE_CHARS &&
                        this.getModerated() == null &&
                        !message.isGeoUri() &&
                        !this.isGeoUri() &&
                        !message.isOOb() &&


@@ 1044,7 1045,7 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable 
        Message current = this;
        while (current.mergeable(current.next())) {
            current = current.next();
            if (current == null) {
            if (current == null || current.getModerated() != null) {
                break;
            }
            body.append("\n\n");


@@ 1087,6 1088,7 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable 

    public boolean wasMergedIntoPrevious() {
        Message prev = this.prev();
        if (getModerated() != null && prev.getModerated() != null) return true;
        return prev != null && prev.mergeable(this);
    }