Harmonize position of boolean message variables

This commit is contained in:
Torsten Grote
2017-04-06 15:42:12 -03:00
parent 9d0dbe9210
commit 0827b067ec
4 changed files with 10 additions and 10 deletions

View File

@@ -13,18 +13,18 @@ public abstract class BaseMessageHeader {
private final MessageId id; private final MessageId id;
private final GroupId groupId; private final GroupId groupId;
private final long timestamp; private final long timestamp;
private final boolean local, read, sent, seen; private final boolean local, sent, seen, read;
public BaseMessageHeader(MessageId id, GroupId groupId, long timestamp, public BaseMessageHeader(MessageId id, GroupId groupId, long timestamp,
boolean local, boolean read, boolean sent, boolean seen) { boolean local, boolean sent, boolean seen, boolean read) {
this.id = id; this.id = id;
this.groupId = groupId; this.groupId = groupId;
this.timestamp = timestamp; this.timestamp = timestamp;
this.local = local; this.local = local;
this.read = read;
this.sent = sent; this.sent = sent;
this.seen = seen; this.seen = seen;
this.read = read;
} }
public MessageId getId() { public MessageId getId() {
@@ -43,10 +43,6 @@ public abstract class BaseMessageHeader {
return local; return local;
} }
public boolean isRead() {
return read;
}
public boolean isSent() { public boolean isSent() {
return sent; return sent;
} }
@@ -55,4 +51,8 @@ public abstract class BaseMessageHeader {
return seen; return seen;
} }
public boolean isRead() {
return read;
}
} }

View File

@@ -22,7 +22,7 @@ public class IntroductionMessage extends BaseMessageHeader {
GroupId groupId, int role, long time, boolean local, boolean sent, GroupId groupId, int role, long time, boolean local, boolean sent,
boolean seen, boolean read) { boolean seen, boolean read) {
super(messageId, groupId, time, local, read, sent, seen); super(messageId, groupId, time, local, sent, seen, read);
this.sessionId = sessionId; this.sessionId = sessionId;
this.messageId = messageId; this.messageId = messageId;
this.role = role; this.role = role;

View File

@@ -14,7 +14,7 @@ public class PrivateMessageHeader extends BaseMessageHeader {
public PrivateMessageHeader(MessageId id, GroupId groupId, long timestamp, public PrivateMessageHeader(MessageId id, GroupId groupId, long timestamp,
boolean local, boolean read, boolean sent, boolean seen) { boolean local, boolean read, boolean sent, boolean seen) {
super(id, groupId, timestamp, local, read, sent, seen); super(id, groupId, timestamp, local, sent, seen, read);
} }
} }

View File

@@ -20,7 +20,7 @@ public class InvitationMessage extends BaseMessageHeader {
boolean local, boolean sent, boolean seen, boolean read, boolean local, boolean sent, boolean seen, boolean read,
SessionId sessionId, ContactId contactId) { SessionId sessionId, ContactId contactId) {
super(id, groupId, time, local, read, sent, seen); super(id, groupId, time, local, sent, seen, read);
this.sessionId = sessionId; this.sessionId = sessionId;
this.contactId = contactId; this.contactId = contactId;
} }