mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Address review comments (rename event, fix annotations, final field)
This commit is contained in:
@@ -26,7 +26,7 @@ import org.briarproject.briar.api.blog.BlogSharingManager;
|
||||
import org.briarproject.briar.api.blog.event.BlogInvitationResponseReceivedEvent;
|
||||
import org.briarproject.briar.api.blog.event.BlogPostAddedEvent;
|
||||
import org.briarproject.briar.api.sharing.InvitationResponse;
|
||||
import org.briarproject.briar.api.sharing.event.ShareableLeftEvent;
|
||||
import org.briarproject.briar.api.sharing.event.ContactLeftShareableEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -110,10 +110,10 @@ class BlogControllerImpl extends BaseControllerImpl
|
||||
LOG.info("Blog invitation accepted");
|
||||
onBlogInvitationAccepted(b.getContactId());
|
||||
}
|
||||
} else if (e instanceof ShareableLeftEvent) {
|
||||
ShareableLeftEvent s = (ShareableLeftEvent) e;
|
||||
} else if (e instanceof ContactLeftShareableEvent) {
|
||||
ContactLeftShareableEvent s = (ContactLeftShareableEvent) e;
|
||||
if (s.getGroupId().equals(groupId)) {
|
||||
LOG.info("Blog left");
|
||||
LOG.info("Blog left by contact");
|
||||
onBlogLeft(s.getContactId());
|
||||
}
|
||||
} else if (e instanceof GroupRemovedEvent) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Set;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@UiThread
|
||||
@NotNullByDefault
|
||||
public class SharingControllerImpl implements SharingController, EventListener {
|
||||
|
||||
@@ -26,8 +25,9 @@ public class SharingControllerImpl implements SharingController, EventListener {
|
||||
private final ConnectionRegistry connectionRegistry;
|
||||
|
||||
@Nullable
|
||||
private SharingListener listener;
|
||||
private Set<ContactId> contacts = new HashSet<>();
|
||||
private volatile SharingListener listener;
|
||||
// only access on @UiThread
|
||||
private final Set<ContactId> contacts = new HashSet<>();
|
||||
|
||||
@Inject
|
||||
SharingControllerImpl(EventBus eventBus,
|
||||
|
||||
Reference in New Issue
Block a user