Extract ForumFactory from ForumManager

The code for creating forums in ForumManager was used by
ForumSharingManager and also needed by InviteeEngine.
This extracts it into its own class.

Closes #375
This commit is contained in:
Torsten Grote
2016-05-16 16:56:44 -03:00
parent fb85345392
commit aad9f5142b
9 changed files with 110 additions and 61 deletions

View File

@@ -129,8 +129,7 @@ public class CreateForumActivity extends BriarActivity
public void run() {
try {
long now = System.currentTimeMillis();
Forum f = forumManager.createForum(name);
forumManager.addForum(f);
Forum f = forumManager.addForum(name);
long duration = System.currentTimeMillis() - now;
if (LOG.isLoggable(INFO))
LOG.info("Storing forum took " + duration + " ms");