Yokan / rebuild
Course 1 8624561

NotificationService.kt

composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/services/notifications/NotificationService.kt

implementation26 lines
1package eu.friedcutlet.yokan.services.notifications23import eu.friedcutlet.yokan.domain.ProfileId4enum class NotificationChannel {5    Downloads,6    LibraryUpdates,7    Backup,8    Sync,9}1011data class NotificationPayload(12    val channel: NotificationChannel,13    val title: String,14    val message: String,15    val tag: String? = null,16    val profileId: ProfileId? = null,17)1819interface NotificationService {20    fun supported(): Boolean21    fun requestPermission() = Unit22    fun notify(payload: NotificationPayload)23    fun cancel(channel: NotificationChannel, tag: String? = null)24}2526expect fun createPlatformNotificationService(profileId: ProfileId = ProfileId.Default): NotificationService27

Search chapters, reference and source filenames.