From: David ‘Bombe’ Roden Date: Thu, 1 Feb 2018 18:42:36 +0000 (+0100) Subject: Use dependency injection for SoneDownloader X-Git-Tag: v79^2~151 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=298e23049639ddbfc3e50507ed6e4bed990f2789;p=Sone.git Use dependency injection for SoneDownloader --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 7384eda..04f7181 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -208,12 +208,12 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, * The database */ @Inject - public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager, UpdateChecker updateChecker, WebOfTrustUpdater webOfTrustUpdater, EventBus eventBus, Database database) { + public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager, SoneDownloader soneDownloader, UpdateChecker updateChecker, WebOfTrustUpdater webOfTrustUpdater, EventBus eventBus, Database database) { super("Sone Core"); this.configuration = configuration; this.freenetInterface = freenetInterface; this.identityManager = identityManager; - this.soneDownloader = new SoneDownloaderImpl(this, freenetInterface); + this.soneDownloader = soneDownloader; this.imageInserter = new ImageInserter(freenetInterface, freenetInterface.new InsertTokenSupplier()); this.updateChecker = updateChecker; this.webOfTrustUpdater = webOfTrustUpdater;