🎨 Use convenience method
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / notification / NewSoneHandler.kt
index 83be6fd..89150cc 100644 (file)
@@ -33,7 +33,7 @@ class NewSoneHandler(private val notificationManager: NotificationManager, templ
 
        @Subscribe
        fun newSoneFound(newSoneFoundEvent: NewSoneFoundEvent) {
-               if (!notificationManager.hasNotification("first-start-notification")) {
+               if (!notificationManager.hasFirstStartNotification()) {
                        notification.add(newSoneFoundEvent.sone)
                        notificationManager.addNotification(notification)
                }
@@ -50,6 +50,3 @@ class NewSoneHandler(private val notificationManager: NotificationManager, templ
        }
 
 }
-
-private fun NotificationManager.hasNotification(id: String) =
-               getNotification(id) != null