package eu.friedcutlet.yokan.services.notifications import eu.friedcutlet.yokan.domain.ProfileId actual fun createPlatformNotificationService(profileId: ProfileId): NotificationService = DesktopNotificationService(profileId) /** * Desktop notifications render as in-app snackbars rather than OS system-tray * balloons. The AWT `TrayIcon.displayMessage` path produced stale/duplicate * popups on Linux, so everything now flows through [InAppNotifications] and is * shown by the root composable's SnackbarHost. */ private class DesktopNotificationService(private val profileId: ProfileId) : NotificationService { override fun supported(): Boolean = true override fun notify(payload: NotificationPayload) { InAppNotifications.post(payload.copy(profileId = profileId)) } override fun cancel(channel: NotificationChannel, tag: String?) = Unit }