mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Implement UI for dissolving and leaving group
This commit is contained in:
@@ -30,6 +30,7 @@ import java.util.logging.Logger;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static java.lang.Math.max;
|
||||
|
||||
import static java.util.logging.Level.WARNING;
|
||||
|
||||
public class GroupControllerImpl extends
|
||||
@@ -174,4 +175,24 @@ public class GroupControllerImpl extends
|
||||
return new GroupMessageItem(header, body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isCreator(final PrivateGroup group,
|
||||
final ResultExceptionHandler<Boolean, DbException> handler) {
|
||||
runOnDbThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
LocalAuthor author = identityManager.getLocalAuthor();
|
||||
boolean isCreator =
|
||||
author.getId().equals(group.getAuthor().getId());
|
||||
handler.onResult(isCreator);
|
||||
} catch (DbException e) {
|
||||
if (LOG.isLoggable(WARNING))
|
||||
LOG.log(WARNING, e.toString(), e);
|
||||
handler.onException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user