Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simple compiler warnings #24

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/net/pterodactylus/sone/main/SoneModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ open class SoneModule(private val sonePlugin: SonePlugin, private val eventBus:
override fun <I> hear(typeLiteral: TypeLiteral<I>, typeEncounter: TypeEncounter<I>) {
typeEncounter.register(InjectionListener { injectee ->
logger.fine { "Injecting $injectee..." }
eventBus.register(injectee)
eventBus.register(injectee as Any)
})
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down