diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt index 829affc5b..07bf23927 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/IdentityManagerImpl.kt @@ -108,12 +108,12 @@ class IdentityManagerImpl @Inject constructor( } @Subscribe - fun strictFilteringActivated(event: StrictFilteringActivatedEvent) { + fun strictFilteringActivated(@Suppress("UNUSED_PARAMETER") event: StrictFilteringActivatedEvent) { strictFiltering.set(true) } @Subscribe - fun strictFilteringDeactivated(event: StrictFilteringDeactivatedEvent) { + fun strictFilteringDeactivated(@Suppress("UNUSED_PARAMETER") event: StrictFilteringDeactivatedEvent) { strictFiltering.set(false) } diff --git a/src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt b/src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt index a4533c5b5..3c235fd95 100644 --- a/src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt +++ b/src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt @@ -70,7 +70,7 @@ open class SoneModule(private val sonePlugin: SonePlugin, private val eventBus: override fun hear(typeLiteral: TypeLiteral, typeEncounter: TypeEncounter) { typeEncounter.register(InjectionListener { injectee -> logger.fine { "Injecting $injectee..." } - eventBus.register(injectee) + eventBus.register(injectee as Any) }) } }) diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt index 027aa8602..b6507f0bf 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/NewPage.kt @@ -25,7 +25,7 @@ class NewPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.New.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) = - getCurrentSone(soneRequest.toadletContext).let { currentSone -> + getCurrentSone(soneRequest.toadletContext).let { _ -> (newElements.newPosts + newElements.newReplies.mapPresent { it.post }) .distinct() .sortedByDescending { it.time }