Add support for revealing contacts to the PrivateGroupManager

This also adds two integration tests and improves some small details
This commit is contained in:
Torsten Grote
2016-11-08 22:26:56 -02:00
parent b20c107010
commit ec8982438a
13 changed files with 402 additions and 156 deletions

View File

@@ -105,7 +105,7 @@ public class GroupActivity extends
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setSubtitle(getString(R.string.groups_created_by,
group.getAuthor().getName()));
group.getCreator().getName()));
}
controller.isCreator(group,
new UiResultExceptionHandler<Boolean, DbException>(this) {

View File

@@ -196,7 +196,7 @@ public class GroupControllerImpl extends
try {
LocalAuthor author = identityManager.getLocalAuthor();
boolean isCreator =
author.getId().equals(group.getAuthor().getId());
author.getId().equals(group.getCreator().getId());
handler.onResult(isCreator);
} catch (DbException e) {
if (LOG.isLoggable(WARNING))

View File

@@ -43,7 +43,7 @@ class GroupItem {
}
Author getCreator() {
return privateGroup.getAuthor();
return privateGroup.getCreator();
}
String getName() {

View File

@@ -7,6 +7,8 @@ import org.briarproject.api.privategroup.GroupMember;
import javax.annotation.concurrent.Immutable;
import static org.briarproject.api.privategroup.Visibility.INVISIBLE;
@Immutable
@NotNullByDefault
class MemberListItem {
@@ -17,7 +19,7 @@ class MemberListItem {
public MemberListItem(GroupMember groupMember) {
this.member = groupMember.getAuthor();
this.sharing = groupMember.isShared();
this.sharing = groupMember.getVisibility() != INVISIBLE; // TODO #732
this.status = groupMember.getStatus();
}