From d82509f3ce370f6a601858b7a95ee8d7f0357a69 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Thu, 23 Jun 2022 11:00:13 +0100 Subject: [PATCH] Address review feedback. --- .../api/mailbox/MailboxUpdateManager.java | 17 +++++++++++++++++ .../mailbox/OwnMailboxContactListWorker.java | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/bramble-api/src/main/java/org/briarproject/bramble/api/mailbox/MailboxUpdateManager.java b/bramble-api/src/main/java/org/briarproject/bramble/api/mailbox/MailboxUpdateManager.java index d77129bae..e9c81237e 100644 --- a/bramble-api/src/main/java/org/briarproject/bramble/api/mailbox/MailboxUpdateManager.java +++ b/bramble-api/src/main/java/org/briarproject/bramble/api/mailbox/MailboxUpdateManager.java @@ -63,9 +63,26 @@ public interface MailboxUpdateManager { */ String GROUP_KEY_SENT_CLIENT_SUPPORTS = "sentClientSupports"; + /** + * Returns the latest {@link MailboxUpdate} sent to the given contact. + *

+ * If we have our own mailbox then the update will be a + * {@link MailboxUpdateWithMailbox} containing the + * {@link MailboxProperties} the contact should use for communicating with + * our mailbox. + */ MailboxUpdate getLocalUpdate(Transaction txn, ContactId c) throws DbException; + /** + * Returns the latest {@link MailboxUpdate} received from the given + * contact, or null if no update has been received. + *

+ * If the contact has a mailbox then the update will be a + * {@link MailboxUpdateWithMailbox} containing the + * {@link MailboxProperties} we should use for communicating with the + * contact's mailbox. + */ @Nullable MailboxUpdate getRemoteUpdate(Transaction txn, ContactId c) throws DbException; diff --git a/bramble-core/src/main/java/org/briarproject/bramble/mailbox/OwnMailboxContactListWorker.java b/bramble-core/src/main/java/org/briarproject/bramble/mailbox/OwnMailboxContactListWorker.java index f1f520d63..40fe296d6 100644 --- a/bramble-core/src/main/java/org/briarproject/bramble/mailbox/OwnMailboxContactListWorker.java +++ b/bramble-core/src/main/java/org/briarproject/bramble/mailbox/OwnMailboxContactListWorker.java @@ -221,7 +221,7 @@ class OwnMailboxContactListWorker if (state != State.UPDATING_CONTACT_LIST) return; update = updates.poll(); if (update == null) { - LOG.info("Contact list is up to date"); + LOG.info("No more updates to process"); state = State.WAITING_FOR_CHANGES; apiCall = null; return;