Address some review comments.

This commit is contained in:
akwizgran
2022-08-16 13:36:15 +01:00
parent 62883b4bde
commit ab360e1e25
2 changed files with 10 additions and 11 deletions

View File

@@ -95,7 +95,8 @@ class MailboxClientManager implements Service, EventListener {
private final TorReachabilityMonitor reachabilityMonitor;
private final AtomicBoolean used = new AtomicBoolean(false);
// The following mutable state must only be accessed on the event thread
// All of the following mutable state must only be accessed on the
// event thread
private final Map<ContactId, Updates> contactUpdates = new HashMap<>();
private final Map<ContactId, MailboxClient> contactClients =
new HashMap<>();
@@ -343,13 +344,12 @@ class MailboxClientManager implements Service, EventListener {
MailboxClient contactClient =
requireNonNull(contactClients.get(c));
contactClient.deassignContactForDownload(c);
assignContactToOwnMailboxForDownload(c, u);
} else {
// The contact doesn't have a usable mailbox, so assign the
// contact to our mailbox for upload and download
// contact to our mailbox for upload
assignContactToOwnMailboxForUpload(c, u);
assignContactToOwnMailboxForDownload(c, u);
}
assignContactToOwnMailboxForDownload(c, u);
}
}