Implemented the setting of the received- and read-date of group messages
This commit is contained in:
parent
f128c2f307
commit
c511e482d3
@ -43,7 +43,18 @@ public final class GroupMessage extends Message {
|
|||||||
this.memberStatuses = memberStatuses;
|
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; }
|
public Map<Long, MessageStatus> getMemberStatuses() { return memberStatuses; }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user