mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Show when private messages have been delivered.
This commit is contained in:
@@ -12,11 +12,11 @@ public class MessageHeader {
|
||||
private final Author.Status authorStatus;
|
||||
private final String contentType;
|
||||
private final long timestamp;
|
||||
private final boolean local, read;
|
||||
private final boolean local, read, delivered;
|
||||
|
||||
public MessageHeader(MessageId id, MessageId parent, GroupId groupId,
|
||||
Author author, Author.Status authorStatus, String contentType,
|
||||
long timestamp, boolean local, boolean read) {
|
||||
long timestamp, boolean local, boolean read, boolean delivered) {
|
||||
this.id = id;
|
||||
this.parent = parent;
|
||||
this.groupId = groupId;
|
||||
@@ -26,6 +26,7 @@ public class MessageHeader {
|
||||
this.timestamp = timestamp;
|
||||
this.local = local;
|
||||
this.read = read;
|
||||
this.delivered = delivered;
|
||||
}
|
||||
|
||||
/** Returns the message's unique identifier. */
|
||||
@@ -79,4 +80,12 @@ public class MessageHeader {
|
||||
public boolean isRead() {
|
||||
return read;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the message has been delivered. (This only applies to
|
||||
* locally generated private messages.)
|
||||
*/
|
||||
public boolean isDelivered() {
|
||||
return delivered;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.briarproject.api.ContactId;
|
||||
import org.briarproject.api.messaging.MessageId;
|
||||
|
||||
/** An event that is broadcast when messages are acked by a contact. */
|
||||
public class MessagesAckedEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final Collection<MessageId> acked;
|
||||
|
||||
public MessagesAckedEvent(ContactId contactId,
|
||||
Collection<MessageId> acked ) {
|
||||
this.contactId = contactId;
|
||||
this.acked = acked;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
public Collection<MessageId> getMessageIds() {
|
||||
return acked;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user