From 433a4c887b96c04308ada10348546cd685bcbe25 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Thu, 10 Oct 2024 01:43:24 +0100 Subject: [PATCH] fix(custom-buttons): revert custom button name to 'Reschedule' Partial revert of b0de535d4c760072807120f1b99662c0f71ff3cf In the above commit, "Reschedule" was renamed to "Set Due Date" but the affected menu item in the Reviewer is "Reschedule": offering "Set Due Date" and "Reset progress" Fixes 16598 --- .../preferences/CustomButtonsSettingsFragment.kt | 12 ------------ .../src/main/res/xml/preferences_custom_buttons.xml | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/CustomButtonsSettingsFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/CustomButtonsSettingsFragment.kt index a045d57db086..879e56ebac8f 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/CustomButtonsSettingsFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/CustomButtonsSettingsFragment.kt @@ -20,11 +20,8 @@ import android.content.Intent import androidx.annotation.VisibleForTesting import androidx.appcompat.app.AlertDialog import androidx.core.content.edit -import androidx.preference.ListPreference import androidx.preference.Preference -import com.ichi2.anki.CollectionManager.TR import com.ichi2.anki.R -import com.ichi2.anki.ui.internationalization.toSentenceCase import com.ichi2.utils.negativeButton import com.ichi2.utils.positiveButton import com.ichi2.utils.show @@ -56,15 +53,6 @@ class CustomButtonsSettingsFragment : SettingsFragment() { } true } - setDynamicTitle() - } - - private fun setDynamicTitle() { - findPreference(getString(R.string.custom_button_schedule_card_key))?.let { - val preferenceTitle = TR.actionsSetDueDate().toSentenceCase(this, R.string.sentence_set_due_date) - it.title = preferenceTitle - it.dialogTitle = preferenceTitle - } } @VisibleForTesting(otherwise = VisibleForTesting.NONE) diff --git a/AnkiDroid/src/main/res/xml/preferences_custom_buttons.xml b/AnkiDroid/src/main/res/xml/preferences_custom_buttons.xml index b8bf97ab3a43..93ae6afcfe41 100644 --- a/AnkiDroid/src/main/res/xml/preferences_custom_buttons.xml +++ b/AnkiDroid/src/main/res/xml/preferences_custom_buttons.xml @@ -27,7 +27,6 @@ TODO: Add a unit test -->