From 6c1565a7d43a54daa54257c1b5257d6f802e0bf6 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 19 Apr 2022 22:39:33 -0400 Subject: [PATCH] Make links in new update dialog clickable Co-authored-by: Jays2Kings --- .../tachiyomi/ui/more/NewUpdateDialogController.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt index 328b959f0..01053d5de 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt @@ -2,6 +2,9 @@ package eu.kanade.tachiyomi.ui.more import android.app.Dialog import android.os.Bundle +import android.text.method.LinkMovementMethod +import android.view.View +import android.widget.TextView import androidx.core.os.bundleOf import com.google.android.material.dialog.MaterialAlertDialogBuilder import eu.kanade.tachiyomi.R @@ -41,6 +44,14 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl } .create() } + + override fun onAttach(view: View) { + super.onAttach(view) + + // Make links in Markdown text clickable + (dialog?.findViewById(android.R.id.message) as? TextView)?.movementMethod = + LinkMovementMethod.getInstance() + } } private const val BODY_KEY = "NewUpdateDialogController.body"