aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-21 22:58:19 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-21 22:58:19 +0200
commit98a8fd4d0585c3b3b6761fc4df210a16c08d104e (patch)
tree06d53d28fed391a1857b9b0fcaf43fb3eeb89ca7
parent49adf4f69a393ff4d5450b7c605ee7498bc587ae (diff)
changed message merger a bit
-rw-r--r--src/eu/siacs/conversations/entities/Message.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java
index 9507b3fc5..8f9885c58 100644
--- a/src/eu/siacs/conversations/entities/Message.java
+++ b/src/eu/siacs/conversations/entities/Message.java
@@ -246,9 +246,10 @@ public class Message extends AbstractEntity {
public void setPresence(String presence) {
if (presence == null) {
- this.counterpart = this.counterpart.split("/",2)[0];
+ this.counterpart = this.counterpart.split("/", 2)[0];
} else {
- this.counterpart = this.counterpart.split("/",2)[0] + "/" + presence;
+ this.counterpart = this.counterpart.split("/", 2)[0] + "/"
+ + presence;
}
}
@@ -257,7 +258,7 @@ public class Message extends AbstractEntity {
}
public String getPresence() {
- String[] counterparts = this.counterpart.split("/",2);
+ String[] counterparts = this.counterpart.split("/", 2);
if (counterparts.length == 2) {
return counterparts[1];
} else {
@@ -326,12 +327,12 @@ public class Message extends AbstractEntity {
&& this.getType() == message.getType()
&& this.getEncryption() == message.getEncryption()
&& this.getCounterpart().equals(message.getCounterpart())
- && (message.getTimeSent() - this.getTimeSent()) <= (Config.MESSAGE_MERGE_WINDOW * 1000)
- && ((this.getStatus() == message.getStatus())
- || (this.getStatus() == Message.STATUS_SEND && (message.getStatus() == Message.STATUS_UNSEND
- || message.getStatus() == Message.STATUS_SEND))
- || (this.getStatus() == Message.STATUS_SEND_RECEIVED
- && message.getStatus() == Message.STATUS_SEND_DISPLAYED)));
+ && (message.getTimeSent() - this.getTimeSent()) <= (Config.MESSAGE_MERGE_WINDOW * 1000) && ((this
+ .getStatus() == message.getStatus() || ((this.getStatus() == Message.STATUS_SEND || this
+ .getStatus() == Message.STATUS_SEND_RECEIVED) && (message
+ .getStatus() == Message.STATUS_UNSEND
+ || message.getStatus() == Message.STATUS_SEND || message
+ .getStatus() == Message.STATUS_SEND_DISPLAYED)))));
}
public String getMergedBody() {