override fun configure() {
bind(NotificationHandler::class.java).`in`(Singleton::class.java)
bind<MarkPostKnownDuringFirstStartHandler>().asSingleton()
+ bind<MarkPostReplyKnownDuringFirstStartHandler>().asSingleton()
bind<SoneLockedOnStartupHandler>().asSingleton()
bind<NewSoneHandler>().asSingleton()
bind<NewRemotePostHandler>().asSingleton()
+ bind<RemotePostReplyHandler>().asSingleton()
bind<SoneLockedHandler>().asSingleton()
bind<LocalPostHandler>().asSingleton()
bind<NewVersionHandler>().asSingleton()
fun getMarkPostKnownHandler(core: Core): Consumer<Post> = Consumer { core.markPostKnown(it) }
@Provides
+ fun getMarkPostReplyKnownHandler(core: Core): Consumer<PostReply> = Consumer { core.markReplyKnown(it) }
+
+ @Provides
@Singleton
@Named("soneLockedOnStartup")
fun getSoneLockedOnStartupNotification(loaders: Loaders) =
@Provides
@Singleton
+ @Named("newRemotePostReply")
+ fun getNewRemotePostReplyNotification(loaders: Loaders) =
+ ListNotification<PostReply>("new-reply-notification", "replies", loaders.loadTemplate("/templates/notify/newReplyNotification.html"), dismissable = false)
+
+ @Provides
+ @Singleton
@Named("soneLocked")
fun getSoneLockedNotification(loaders: Loaders) =
ListNotification<Sone>("sones-locked-notification", "sones", loaders.loadTemplate("/templates/notify/lockedSonesNotification.html"), dismissable = true)