mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Address review comments
This commit is contained in:
@@ -32,7 +32,10 @@ class ConversationManagerImpl implements ConversationManager {
|
||||
|
||||
@Override
|
||||
public void registerConversationClient(ConversationClient client) {
|
||||
clients.add(client);
|
||||
if (!clients.add(client)) {
|
||||
throw new IllegalStateException(
|
||||
"This client is already registered");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +59,8 @@ class ConversationManagerImpl implements ConversationManager {
|
||||
public GroupCount getGroupCount(ContactId contactId)
|
||||
throws DbException {
|
||||
|
||||
long msgCount = 0, unreadCount = 0, latestTime = 0;
|
||||
int msgCount = 0, unreadCount = 0;
|
||||
long latestTime = 0;
|
||||
Transaction txn = db.startTransaction(true);
|
||||
try {
|
||||
for (ConversationClient client : clients) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.briarproject.api.sync.GroupId;
|
||||
import org.briarproject.api.sync.Message;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
import org.briarproject.api.sync.MessageStatus;
|
||||
import org.briarproject.clients.ConversationClient;
|
||||
import org.briarproject.clients.ConversationClientImpl;
|
||||
import org.briarproject.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -35,7 +35,7 @@ import javax.inject.Inject;
|
||||
|
||||
import static org.briarproject.clients.BdfConstants.MSG_KEY_READ;
|
||||
|
||||
class MessagingManagerImpl extends ConversationClient
|
||||
class MessagingManagerImpl extends ConversationClientImpl
|
||||
implements MessagingManager, Client, AddContactHook, RemoveContactHook {
|
||||
|
||||
static final ClientId CLIENT_ID = new ClientId(StringUtils.fromHexString(
|
||||
|
||||
Reference in New Issue
Block a user