mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
[core] address review comments for message deletion explanation
This commit is contained in:
@@ -17,10 +17,10 @@ import java.util.Set;
|
||||
@NotNullByDefault
|
||||
public interface ConversationManager {
|
||||
|
||||
int DELETE_SESSION_IS_INTRODUCTION = 1;
|
||||
int DELETE_SESSION_IS_INVITATION = 1 << 1;
|
||||
int DELETE_SESSION_INCOMPLETE = 1 << 2;
|
||||
int DELETE_SESSION_IN_PROGRESS = 1 << 3;
|
||||
int DELETE_SESSION_INTRODUCTION_INCOMPLETE = 1;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,10 +5,10 @@ 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_INCOMPLETE;
|
||||
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_IN_PROGRESS;
|
||||
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_IS_INTRODUCTION;
|
||||
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_IS_INVITATION;
|
||||
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;
|
||||
import static org.briarproject.briar.api.conversation.ConversationManager.DELETE_SESSION_INVITATION_IN_PROGRESS;
|
||||
|
||||
@NotThreadSafe
|
||||
@NotNullByDefault
|
||||
@@ -21,19 +21,19 @@ public class DeletionResult {
|
||||
}
|
||||
|
||||
public void addInvitationNotAllSelected() {
|
||||
result |= DELETE_SESSION_INCOMPLETE | DELETE_SESSION_IS_INVITATION;
|
||||
result |= DELETE_SESSION_INVITATION_INCOMPLETE;
|
||||
}
|
||||
|
||||
public void addInvitationSessionInProgress() {
|
||||
result |= DELETE_SESSION_IN_PROGRESS | DELETE_SESSION_IS_INVITATION;
|
||||
result |= DELETE_SESSION_INVITATION_IN_PROGRESS;
|
||||
}
|
||||
|
||||
public void addIntroductionNotAllSelected() {
|
||||
result |= DELETE_SESSION_INCOMPLETE | DELETE_SESSION_IS_INTRODUCTION;
|
||||
result |= DELETE_SESSION_INTRODUCTION_INCOMPLETE;
|
||||
}
|
||||
|
||||
public void addIntroductionSessionInProgress() {
|
||||
result |= DELETE_SESSION_IN_PROGRESS | DELETE_SESSION_IS_INTRODUCTION;
|
||||
result |= DELETE_SESSION_INTRODUCTION_IN_PROGRESS;
|
||||
}
|
||||
|
||||
public void addNotFullyDownloaded() {
|
||||
@@ -44,20 +44,20 @@ public class DeletionResult {
|
||||
return result == 0;
|
||||
}
|
||||
|
||||
public boolean hasIntroduction() {
|
||||
return (result & DELETE_SESSION_IS_INTRODUCTION) != 0;
|
||||
public boolean hasIntroductionSessionInProgress() {
|
||||
return (result & DELETE_SESSION_INTRODUCTION_IN_PROGRESS) != 0;
|
||||
}
|
||||
|
||||
public boolean hasInvitation() {
|
||||
return (result & DELETE_SESSION_IS_INVITATION) != 0;
|
||||
public boolean hasInvitationSessionInProgress() {
|
||||
return (result & DELETE_SESSION_INVITATION_IN_PROGRESS) != 0;
|
||||
}
|
||||
|
||||
public boolean hasSessionInProgress() {
|
||||
return (result & DELETE_SESSION_IN_PROGRESS) != 0;
|
||||
public boolean hasNotAllIntroductionSelected() {
|
||||
return (result & DELETE_SESSION_INTRODUCTION_INCOMPLETE) != 0;
|
||||
}
|
||||
|
||||
public boolean hasNotAllSelected() {
|
||||
return (result & DELETE_SESSION_INCOMPLETE) != 0;
|
||||
public boolean hasNotAllInvitationSelected() {
|
||||
return (result & DELETE_SESSION_INVITATION_INCOMPLETE) != 0;
|
||||
}
|
||||
|
||||
public boolean hasNotFullyDownloaded() {
|
||||
|
||||
Reference in New Issue
Block a user