Add an option to disable search history.

This commit is contained in:
Alex Ning
2020-12-02 18:47:11 +08:00
parent 58a19c9ad1
commit 805017233b
6 changed files with 30 additions and 16 deletions

View File

@@ -89,7 +89,8 @@
<View
android:id="@+id/divider_search_activity"
android:layout_width="match_parent"
android:layout_height="1dp" />
android:layout_height="1dp"
android:visibility="gone" />
<TextView
android:id="@+id/recent_summary_text_view_search_activity"
@@ -103,7 +104,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_search_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>

View File

@@ -508,6 +508,7 @@
<string name="settings_swipe_action_swipe_right_title">Swipe Right</string>
<string name="settings_swipe_action_info_summary">Not applicable to post feed with more than 1 column or post detail.</string>
<string name="settings_language_title">Language</string>
<string name="settings_enable_search_history">Enable Search History</string>
<string name="no_link_available">Cannot get the link</string>

View File

@@ -25,6 +25,12 @@
app:title="@string/settings_respect_subreddit_recommended_comment_sort_type_title"
app:summary="@string/settings_respect_subreddit_recommended_comment_sort_type_summary" />
<SwitchPreference
app:defaultValue="true"
app:key="enable_search_history"
app:title="@string/settings_enable_search_history"
app:summary="@string/only_for_logged_in_user" />
<ListPreference
app:defaultValue="auto"
app:entries="@array/settings_language"