From cde0f94b79b02ceb179d7c4cd44aa54005129a3a Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 11 Dec 2023 10:42:37 -0500 Subject: [PATCH] feat: add backend info to version block in about --- .../java/com/ichi2/anki/preferences/AboutFragment.kt | 5 +++++ AnkiDroid/src/main/res/layout/about_layout.xml | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AboutFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AboutFragment.kt index 075d8c1d579f..8e7c945a698e 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AboutFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AboutFragment.kt @@ -40,6 +40,7 @@ import com.ichi2.utils.show import java.text.SimpleDateFormat import java.util.Date import java.util.Locale +import net.ankiweb.rsdroid.BuildConfig as BackendBuildConfig class AboutFragment : Fragment() { override fun onCreateView( @@ -58,6 +59,10 @@ class AboutFragment : Fragment() { layoutView.findViewById(R.id.about_version).text = pkgVersionName + // Backend version text + layoutView.findViewById(R.id.about_backend).text = + "(anki " + BackendBuildConfig.ANKI_DESKTOP_VERSION + " / " + BackendBuildConfig.ANKI_COMMIT_HASH.subSequence(0, 8) + ")" + // Logo secret layoutView.findViewById(R.id.about_app_logo) .setOnClickListener(DevOptionsSecretClickListener(requireActivity() as Preferences)) diff --git a/AnkiDroid/src/main/res/layout/about_layout.xml b/AnkiDroid/src/main/res/layout/about_layout.xml index 70f0fc57676d..d2881c8c6827 100644 --- a/AnkiDroid/src/main/res/layout/about_layout.xml +++ b/AnkiDroid/src/main/res/layout/about_layout.xml @@ -55,9 +55,16 @@ style="?android:textAppearanceSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="14dp" tools:text="13 Apr 2023" /> + +