import net.pterodactylus.sone.fcp.*;
import net.pterodactylus.sone.freenet.wot.*;
import net.pterodactylus.sone.web.*;
+import net.pterodactylus.sone.web.notification.NotificationHandler;
+import net.pterodactylus.sone.web.notification.NotificationHandlerModule;
import freenet.l10n.BaseL10n.*;
import freenet.l10n.*;
import freenet.support.api.*;
import com.google.common.annotations.*;
+import com.google.common.eventbus.*;
import com.google.common.cache.*;
import com.google.inject.*;
+import com.google.inject.Module;
import com.google.inject.name.*;
import kotlin.jvm.functions.*;
/* create the web interface. */
webInterface = injector.getInstance(WebInterface.class);
+ /* we need to request this to install all notification handlers. */
+ injector.getInstance(NotificationHandler.class);
+
/* start core! */
core.start();
+
+ /* start the web interface! */
webInterface.start();
webInterface.setFirstStart(injector.getInstance(Key.get(Boolean.class, Names.named("FirstStart"))));
webInterface.setNewConfig(injector.getInstance(Key.get(Boolean.class, Names.named("NewConfig"))));
@VisibleForTesting
protected Injector createInjector() {
FreenetModule freenetModule = new FreenetModule(pluginRespirator);
- AbstractModule soneModule = new SoneModule(this);
+ AbstractModule soneModule = new SoneModule(this, new EventBus());
Module webInterfaceModule = new WebInterfaceModule();
+ Module notificationHandlerModule = new NotificationHandlerModule();
- return createInjector(freenetModule, soneModule, webInterfaceModule);
+ return createInjector(freenetModule, soneModule, webInterfaceModule, notificationHandlerModule);
}
@VisibleForTesting