diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml index 261d17b..bc6d186 100644 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -58,6 +58,14 @@ + + + + + + diff --git a/composeApp/src/androidMain/kotlin/dev/datlag/aniflow/other/BurningSeriesReceiver.kt b/composeApp/src/androidMain/kotlin/dev/datlag/aniflow/other/BurningSeriesReceiver.kt new file mode 100644 index 0000000..f5e26f9 --- /dev/null +++ b/composeApp/src/androidMain/kotlin/dev/datlag/aniflow/other/BurningSeriesReceiver.kt @@ -0,0 +1,17 @@ +package dev.datlag.aniflow.other + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import dev.datlag.aniflow.model.ifValueOrNull + +open class BurningSeriesReceiver : BroadcastReceiver() { + override fun onReceive(context: Context?, intent: Intent?) { + intent?.let { i -> + val seriesHref = i.getStringExtra("href")?.ifBlank { null } ?: return@let + val watched = i.getIntExtra("watched", -1).ifValueOrNull(-1) { return@let } + + // ToDo("check connected href and set watched status") + } + } +} \ No newline at end of file