Skip to content

Commit

Permalink
Enable searching for backups related settings
Browse files Browse the repository at this point in the history
One of the backups setting which was used as a helper label was
removed as an option for the results.
  • Loading branch information
lukstbit authored and mikehardy committed Sep 28, 2024
1 parent f790113 commit ac0f2c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class HeaderFragment : PreferenceFragmentCompat() {
.addBreadcrumb(R.string.pref_cat_appearance)
index(R.xml.preferences_controls)
index(R.xml.preferences_accessibility)
index(R.xml.preferences_backup_limits)
ignorePreference(activity.getString(R.string.pref_backups_help_key))
}

// Some preferences and categories are only shown conditionally,
Expand Down
1 change: 1 addition & 0 deletions AnkiDroid/src/main/res/values/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
<string name="about_screen_key">aboutScreen</string>

<!-- Backup limits -->
<string name="pref_backups_screen_key">backupsScreen</string>
<string name="pref_backups_help_key">backups_help</string>
<string name="pref_minutes_between_automatic_backups_key">minutes_between_automatic_backups</string>
<string name="pref_daily_backups_to_keep_key">daily_backups_to_keep</string>
Expand Down
3 changes: 2 additions & 1 deletion AnkiDroid/src/main/res/xml/preferences_backup_limits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://arbitrary.app.namespace/com.ichi2.anki"
android:title="@string/button_backup">
android:title="@string/button_backup"
android:key="@string/pref_backups_screen_key">
<!-- Includes modified text from `TR.preferencesBackupExplanation()`
and `TR.preferencesNoteMediaIsNotBackedUp()`. -->
<com.ichi2.preferences.HtmlHelpPreference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class PreferencesAnalyticsTest : RobolectricTest() {
"customSyncServerScreen",
"appBarButtonsScreen",
"pref_screen_advanced",
"backupsScreen",
"backups_help",
// Categories: don't have a value
"appearance_preference_group",
Expand Down

0 comments on commit ac0f2c2

Please sign in to comment.