✨ Add debug flags to Core
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / main / SoneModule.kt
index 18f4b95..07ec56e 100644 (file)
@@ -7,6 +7,7 @@ import com.google.inject.matcher.*
 import com.google.inject.name.Names.*
 import com.google.inject.spi.*
 import freenet.l10n.*
+import net.pterodactylus.sone.core.*
 import net.pterodactylus.sone.database.*
 import net.pterodactylus.sone.database.memory.*
 import net.pterodactylus.sone.freenet.wot.*
@@ -60,6 +61,12 @@ class SoneModule(private val sonePlugin: SonePlugin) : AbstractModule() {
                })
        }
 
+       @Provides
+       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)
+                       }
+
 }
 
 private fun String.parseVersion(): Version = Version.parse(this)