Implemented the setting of the received- and read-date of group messages
This commit is contained in:
parent
11235ba0b0
commit
cf9198781f
@ -43,7 +43,18 @@ public final class GroupMessage extends Message {
|
||||
this.memberStatuses = memberStatuses;
|
||||
}
|
||||
|
||||
public void updateStatus() { setStatus(Collections.min(memberStatuses.values())); }
|
||||
public void updateStatus() {
|
||||
setStatus(Collections.min(memberStatuses.values()));
|
||||
switch (getStatus()) {
|
||||
case RECEIVED:
|
||||
setReceivedDate(new Date());
|
||||
break;
|
||||
|
||||
case READ:
|
||||
setReadDate(new Date());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Long, MessageStatus> getMemberStatuses() { return memberStatuses; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user