Added third group visibility state.

This commit is contained in:
akwizgran
2016-11-15 14:08:01 +00:00
parent 007df4288b
commit ec1f4dccdb
19 changed files with 563 additions and 408 deletions

View File

@@ -33,6 +33,7 @@ import java.util.Map;
import javax.inject.Inject;
import static org.briarproject.api.sync.Group.Visibility.SHARED;
import static org.briarproject.clients.BdfConstants.MSG_KEY_READ;
@NotNullByDefault
@@ -64,7 +65,7 @@ class MessagingManagerImpl extends ConversationClientImpl
if (db.containsGroup(txn, g.getId())) return;
// Store the group and share it with the contact
db.addGroup(txn, g);
db.setVisibleToContact(txn, c.getId(), g.getId(), true);
db.setGroupVisibility(txn, c.getId(), g.getId(), SHARED);
// Attach the contact ID to the group
BdfDictionary d = new BdfDictionary();
d.put("contactId", c.getId().getInt());