X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FLocalPostHandler.kt;h=e7b8f05d6b4d2378b91f23a076806d21983ad6fc;hp=a5153ce2254691bc1e4d96376305ab49446385f6;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=146335994dc415527bc4c8ec9a0981d739444ea8 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/LocalPostHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/LocalPostHandler.kt index a5153ce..e7b8f05 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/LocalPostHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/LocalPostHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - NewLocalPostHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - LocalPostHandler.kt - Copyright © 2019–2020 David ‘Bombe’ Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,9 +33,9 @@ class LocalPostHandler @Inject constructor(private val notificationManager: Noti fun newPostFound(newPostFoundEvent: NewPostFoundEvent) { newPostFoundEvent.post.onLocal { post -> notification.add(post) - } - if (!notificationManager.hasFirstStartNotification()) { - notificationManager.addNotification(notification) + if (!notificationManager.hasFirstStartNotification()) { + notificationManager.addNotification(notification) + } } }