Skip to content

Commit

Permalink
feat: add backend info to version block in about
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Dec 11, 2023
1 parent 5c75c82 commit cde0f94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -58,6 +59,10 @@ class AboutFragment : Fragment() {
layoutView.findViewById<TextView>(R.id.about_version).text =
pkgVersionName

// Backend version text
layoutView.findViewById<TextView>(R.id.about_backend).text =
"(anki " + BackendBuildConfig.ANKI_DESKTOP_VERSION + " / " + BackendBuildConfig.ANKI_COMMIT_HASH.subSequence(0, 8) + ")"

// Logo secret
layoutView.findViewById<ImageView>(R.id.about_app_logo)
.setOnClickListener(DevOptionsSecretClickListener(requireActivity() as Preferences))
Expand Down
9 changes: 8 additions & 1 deletion AnkiDroid/src/main/res/layout/about_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

<TextView
android:id="@+id/about_backend"
style="?android:textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
tools:text="(anki 23.10.1 / be74babb0)" />

<TextView
android:id="@+id/about_contributors_title"
android:layout_width="match_parent"
Expand Down

0 comments on commit cde0f94

Please sign in to comment.