Skip to content

Commit

Permalink
fix(custom-buttons): revert custom button name to 'Reschedule'
Browse files Browse the repository at this point in the history
Partial revert of b0de535

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
  • Loading branch information
david-allison authored and mikehardy committed Oct 10, 2024
1 parent d189482 commit 433a4c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -56,15 +53,6 @@ class CustomButtonsSettingsFragment : SettingsFragment() {
}
true
}
setDynamicTitle()
}

private fun setDynamicTitle() {
findPreference<ListPreference>(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)
Expand Down
3 changes: 1 addition & 2 deletions AnkiDroid/src/main/res/xml/preferences_custom_buttons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ TODO: Add a unit test
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:title="@string/custom_buttons"
android:key="@string/pref_app_bar_buttons_screen_key">
<Preference
Expand All @@ -53,7 +52,7 @@ TODO: Add a unit test
android:entries="@array/custom_button_labels"
android:entryValues="@array/custom_button_values"
android:key="@string/custom_button_schedule_card_key"
tools:title="Set due date"
android:title="@string/card_editor_reschedule_card"
app:useSimpleSummaryProvider="true"/>
<ListPreference
android:defaultValue="2"
Expand Down

0 comments on commit 433a4c8

Please sign in to comment.