Only allow one private group (the inbox) to be shared with each contact.

This commit is contained in:
akwizgran
2013-12-19 22:12:49 +00:00
parent 0dc869228b
commit caec26e9cd
8 changed files with 68 additions and 61 deletions

View File

@@ -208,8 +208,8 @@ SelectContactsDialog.Listener {
long now = System.currentTimeMillis();
if(subscribe) {
if(!wasSubscribed) db.addGroup(group);
db.setVisibleToAll(group.getId(), all);
if(!all) db.setVisibility(group.getId(), visible);
db.setVisibleToAll(group, all);
if(!all) db.setVisibility(group, visible);
} else if(wasSubscribed) {
db.removeGroup(group);
}

View File

@@ -176,8 +176,8 @@ SelectContactsDialog.Listener {
Group g = groupFactory.createGroup(name, false);
long now = System.currentTimeMillis();
db.addGroup(g);
if(all) db.setVisibleToAll(g.getId(), true);
else db.setVisibility(g.getId(), visible);
if(all) db.setVisibleToAll(g, true);
else db.setVisibility(g, visible);
long duration = System.currentTimeMillis() - now;
if(LOG.isLoggable(INFO))
LOG.info("Storing group took " + duration + " ms");