Delete private messages when their timers expire (needs UI support).

This commit is contained in:
akwizgran
2021-02-25 15:56:29 +00:00
committed by Torsten Grote
parent c89bde08db
commit 240e619248
16 changed files with 710 additions and 145 deletions

View File

@@ -61,8 +61,11 @@ public interface MessageTracker {
/**
* Marks a message as read or unread and updates the group count.
*
* @return True if the message was previously marked as read
*/
void setReadFlag(GroupId g, MessageId m, boolean read) throws DbException;
boolean setReadFlag(Transaction txn, GroupId g, MessageId m, boolean read)
throws DbException;
/**
* Resets the {@link GroupCount} to the given msgCount and unreadCount.

View File

@@ -21,7 +21,6 @@ public interface ConversationManager {
int DELETE_SESSION_INVITATION_INCOMPLETE = 1 << 1;
int DELETE_SESSION_INTRODUCTION_IN_PROGRESS = 1 << 2;
int DELETE_SESSION_INVITATION_IN_PROGRESS = 1 << 3;
int DELETE_NOT_DOWNLOADED = 1 << 4;
/**
* Clients that present messages in a private conversation need to

View File

@@ -4,7 +4,6 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import javax.annotation.concurrent.NotThreadSafe;
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_NOT_DOWNLOADED;
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_INTRODUCTION_INCOMPLETE;
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_INTRODUCTION_IN_PROGRESS;
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_INVITATION_INCOMPLETE;
@@ -36,10 +35,6 @@ public class DeletionResult {
result |= DELETE_SESSION_INTRODUCTION_IN_PROGRESS;
}
public void addNotFullyDownloaded() {
result |= DELETE_NOT_DOWNLOADED;
}
public boolean allDeleted() {
return result == 0;
}
@@ -59,9 +54,4 @@ public class DeletionResult {
public boolean hasNotAllInvitationSelected() {
return (result & DELETE_SESSION_INVITATION_INCOMPLETE) != 0;
}
public boolean hasNotFullyDownloaded() {
return (result & DELETE_NOT_DOWNLOADED) != 0;
}
}