Add a new activity that shows sharing status of forum

The new activity shows who you are sharing a forum with and who shares a
forum with you. It is accessible from the overflow menu when in a forum.

Closes #398
This commit is contained in:
Torsten Grote
2016-05-13 15:36:49 -03:00
parent 8c2fd905a1
commit b13bf66165
17 changed files with 334 additions and 17 deletions

View File

@@ -442,15 +442,15 @@ class ForumSharingManagerImpl extends BdfIncomingMessageHook
}
@Override
public Collection<ContactId> getSharedWith(GroupId g) throws DbException {
public Collection<Contact> getSharedWith(GroupId g) throws DbException {
try {
List<ContactId> shared = new ArrayList<ContactId>();
List<Contact> shared = new ArrayList<Contact>();
Transaction txn = db.startTransaction(true);
try {
for (Contact c : db.getContacts(txn)) {
GroupId contactGroup = getContactGroup(c).getId();
if (listContains(txn, contactGroup, g, SHARED_BY_US))
shared.add(c.getId());
shared.add(c);
}
txn.setComplete();
} finally {