🐛 Create Core as singleton
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / main / SoneModule.kt
index 07ec56e..66cd29a 100644 (file)
@@ -62,6 +62,7 @@ class SoneModule(private val sonePlugin: SonePlugin) : AbstractModule() {
        }
 
        @Provides
+       @Singleton
        fun getCore(configuration: Configuration, freenetInterface: FreenetInterface, identityManager: IdentityManager, soneDownloader: SoneDownloader, imageInserter: ImageInserter, updateChecker: UpdateChecker, webOfTrustUpdater: WebOfTrustUpdater, eventBus: EventBus, database: Database) =
                        Core(configuration, freenetInterface, identityManager, soneDownloader, imageInserter, updateChecker, webOfTrustUpdater, eventBus, database).apply {
                                debugInformation.showVersionInformation = configuration.getBooleanValue("Debug/ShowVersionInformation").getValue(false)