Inject identity loader instead of context into identity manager.
[Sone.git] / src / main / java / net / pterodactylus / sone / freenet / wot / IdentityManager.java
index e89c667..22c1b71 100644 (file)
@@ -33,7 +33,6 @@ import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
 import com.google.common.eventbus.EventBus;
 import com.google.inject.Inject;
-import com.google.inject.name.Named;
 
 /**
  * The identity manager takes care of loading and storing identities, their
@@ -69,16 +68,13 @@ public class IdentityManager extends AbstractService {
         *            The event bus
         * @param webOfTrustConnector
         *            The Web of Trust connector
-        * @param context
-        *            The context to focus on (may be {@code null} to ignore
-        *            contexts)
         */
        @Inject
-       public IdentityManager(EventBus eventBus, WebOfTrustConnector webOfTrustConnector, @Named("WebOfTrustContext") String context) {
+       public IdentityManager(EventBus eventBus, WebOfTrustConnector webOfTrustConnector, IdentityLoader identityLoader) {
                super("Sone Identity Manager", false);
                this.eventBus = eventBus;
                this.webOfTrustConnector = webOfTrustConnector;
-               this.identityLoader = new IdentityLoader(webOfTrustConnector, fromNullable(context));
+               this.identityLoader = identityLoader;
        }
 
        //