Commit 282d78ec authored by Hussein's avatar Hussein

P4A-880 Add preference category

Improve code in GeneralSettingsFragment
parent 7d501fd5
......@@ -136,17 +136,13 @@ class GeneralSettingsFragment : PreferenceFragmentCompat() {
val returnToList: CheckBoxPreference? = findPreference(MESSAGEVIEW_RETURN_TO_LIST) as? CheckBoxPreference
val showNextMsg: CheckBoxPreference? = findPreference(MESSAGEVIEW_SHOW_NEXT_MSG) as? CheckBoxPreference
returnToList?.setOnPreferenceChangeListener { preference, newValue ->
if (newValue as Boolean) {
showNextMsg?.isChecked = false
}
returnToList?.setOnPreferenceChangeListener { _, check ->
showNextMsg?.isChecked = !(check as Boolean)
true
}
showNextMsg?.setOnPreferenceChangeListener { preference, newValue ->
if (newValue as Boolean) {
returnToList?.isChecked = false
}
showNextMsg?.setOnPreferenceChangeListener { _, check ->
returnToList?.isChecked = !(check as Boolean)
true
}
......
......@@ -226,9 +226,7 @@
android:key="volume_navigation"
android:title="@string/volume_navigation_title" />
<PreferenceCategory
android:key="global_settings_messageiew_after_delete_behavior"
android:title="@string/global_settings_messageiew_after_delete_behavior_title">
<PreferenceCategory android:title="@string/global_settings_messageiew_after_delete_behavior_title">
<CheckBoxPreference
android:key="messageview_return_to_list"
android:summary="@string/global_settings_messageview_return_to_list_summary"
......@@ -240,13 +238,15 @@
android:title="@string/global_settings_messageview_show_next_label" />
</PreferenceCategory>
<MultiSelectListPreference
android:dialogTitle="@string/global_settings_confirm_actions_title"
android:entries="@array/confirm_action_entries"
android:entryValues="@array/confirm_action_values"
android:key="confirm_actions"
android:summary="@string/global_settings_confirm_actions_summary"
android:title="@string/global_settings_confirm_actions_title" />
<PreferenceCategory>
<MultiSelectListPreference
android:dialogTitle="@string/global_settings_confirm_actions_title"
android:entries="@array/confirm_action_entries"
android:entryValues="@array/confirm_action_values"
android:key="confirm_actions"
android:summary="@string/global_settings_confirm_actions_summary"
android:title="@string/global_settings_confirm_actions_title" />
</PreferenceCategory>
<PreferenceCategory
android:key="advanced_interaction_preferences"
......@@ -347,7 +347,7 @@
android:persistent="false"
android:singleLine="true"
android:summary="Encrypt messages with additional keys."
android:title="@string/master_key_management"></Preference>
android:title="@string/master_key_management"/>
<SwitchPreferenceCompat
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment