diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/exceptions/resolve/CaptchaHandler.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/exceptions/resolve/CaptchaHandler.kt index ba3dbdc80..f73dbb8f3 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/exceptions/resolve/CaptchaHandler.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/exceptions/resolve/CaptchaHandler.kt @@ -54,6 +54,7 @@ import org.koitharu.kotatsu.core.util.ext.processLifecycleScope import org.koitharu.kotatsu.core.util.ext.toBitmapOrNull import org.koitharu.kotatsu.parsers.model.MangaSource import org.koitharu.kotatsu.parsers.network.CloudFlareHelper +import org.koitharu.kotatsu.parsers.util.mapToArray import org.koitharu.kotatsu.parsers.util.runCatchingCancellable import javax.inject.Inject import javax.inject.Provider @@ -152,6 +153,15 @@ class CaptchaHandler @Inject constructor( .setOnlyAlertOnce(true) .setSmallIcon(R.drawable.ic_bot) .setGroup(GROUP_CAPTCHA) + .setContentIntent( + PendingIntentCompat.getActivities( + context, GROUP_NOTIFICATION_ID, + exceptions.mapToArray { e -> + AppRouter.cloudFlareResolveIntent(context, e) + }, + 0, false, + ), + ) .setContentText( context.getString( R.string.captcha_required_summary, context.getString(R.string.app_name), @@ -172,7 +182,6 @@ class CaptchaHandler @Inject constructor( private suspend fun buildNotification(exception: CloudFlareProtectedException): Notification { val intent = AppRouter.cloudFlareResolveIntent(context, exception) - .setData(exception.url.toUri()) val discardIntent = Intent(ACTION_DISCARD) .putExtra(AppRouter.KEY_SOURCE, exception.source.name) .setData("source://${exception.source.name}".toUri())