From d9e26516c7715a70af3734ecb942d3e97fd87a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 20 Feb 2025 22:30:22 +0800 Subject: [PATCH] Fix missing links for new deprecated warnings --- .../java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt b/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt index 1068f2d..9a83679 100644 --- a/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt +++ b/app/src/main/java/io/nekohasekai/sfa/ui/main/DashboardFragment.kt @@ -138,9 +138,11 @@ class DashboardFragment : Fragment(R.layout.fragment_dashboard) { builder.setPositiveButton(R.string.ok) { _, _ -> loopShowDeprecatedNotes(notes) } - builder.setNeutralButton(R.string.service_error_deprecated_warning_documentation) { _, _ -> - requireContext().launchCustomTab(note.migrationLink) - loopShowDeprecatedNotes(notes) + if (!note.migrationLink.isNullOrBlank()) { + builder.setNeutralButton(R.string.service_error_deprecated_warning_documentation) { _, _ -> + requireContext().launchCustomTab(note.migrationLink) + loopShowDeprecatedNotes(notes) + } } builder.show() }