Merge branch '671-implement-ux-for-leaving-a-group' into 'master'

Implement UX for leaving a group

This MR also includes the creator's part of the UX for dissolving a group since it is almost the same.

![device-2016-10-26-185615](/uploads/8689a1ee103fcee23105a469b37c59de/device-2016-10-26-185615.png)

Closes #671

See merge request !367
This commit is contained in:
akwizgran
2016-11-01 10:57:33 +00:00
8 changed files with 125 additions and 15 deletions

View File

@@ -138,12 +138,13 @@ public class PrivateGroupManagerImpl extends BdfIncomingMessageHook implements
@Override
public void removePrivateGroup(GroupId g) throws DbException {
// TODO
Transaction txn = db.startTransaction(false);
try {
for (PrivateGroupHook hook : hooks) {
hook.removingGroup(txn, g);
}
Group group = db.getGroup(txn, g);
db.removeGroup(txn, group);
txn.setComplete();
} finally {
db.endTransaction(txn);