Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5773.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move "Ignored users" setting section into "Security & Privacy"
5 changes: 2 additions & 3 deletions vector-config/src/main/res/values/config-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<bool name="settings_root_notification_visible">true</bool>
<bool name="settings_root_preferences_visible">true</bool>
<bool name="settings_root_voice_video_visible">true</bool>
<bool name="settings_root_ignored_users_visible">true</bool>
<bool name="settings_root_security_privacy_visible">true</bool>
<bool name="settings_root_labs_visible">true</bool>
<bool name="settings_root_advanced_visible">true</bool>
Expand All @@ -33,10 +32,10 @@

<!-- Level 1: Voice and video -->

<!-- Level 1: Ignored Users -->

<!-- Level 1: Security and Privacy -->

<bool name="settings_ignored_users_visible">true</bool>

<!-- Level 1: Labs -->
<bool name="settings_labs_thread_messages_default">false</bool>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
private val secureBackupPreference by lazy {
findPreference<VectorPreference>("SETTINGS_SECURE_BACKUP_RECOVERY_PREFERENCE_KEY")!!
}

private val ignoredUsersPreference by lazy {
findPreference<VectorPreference>("SETTINGS_IGNORED_USERS_PREFERENCE_KEY")!!
}
// private val secureBackupResetPreference by lazy {
// findPreference<VectorPreference>(VectorPreferences.SETTINGS_SECURE_BACKUP_RESET_PREFERENCE_KEY)
// }
Expand Down Expand Up @@ -275,6 +279,11 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
ContextCompat.getDrawable(it, R.drawable.ic_secure_backup)!!, R.attr.vctr_content_primary)
}

ignoredUsersPreference.icon = activity?.let {
ThemeUtils.tintDrawable(it,
ContextCompat.getDrawable(it, R.drawable.ic_settings_root_ignored_users)!!, R.attr.vctr_content_primary)
}

findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTOGRAPHY_HS_ADMIN_DISABLED_E2E_DEFAULT)?.let {
it.icon = ThemeUtils.tintDrawableWithColor(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_notification_privacy_warning)!!,
Expand Down
10 changes: 7 additions & 3 deletions vector/src/main/res/drawable/ic_secure_backup.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
Expand All @@ -8,13 +9,16 @@
android:pathData="M1,2h21.5v5h-21.5zM1,17.7h21.5v5h-21.5z"/>
<path
android:pathData="M3.1663,12.4014C3.1663,7.6467 6.9953,3.8177 11.75,3.8177C13.0964,3.8177 14.4429,4.1544 15.6631,4.7435H14.9899C14.5691,4.7435 14.2325,5.0801 14.2325,5.5008C14.2325,5.9216 14.5691,6.2582 14.9899,6.2582H17.3041C17.809,6.2582 18.1877,5.8375 18.1877,5.3746V3.0604C18.1877,2.6396 17.8511,2.303 17.4303,2.303C17.0096,2.303 16.673,2.6396 16.673,3.0604V3.6074C16.6309,3.5653 16.5888,3.5653 16.5467,3.5232C15.074,2.7238 13.433,2.303 11.75,2.303C6.1958,2.303 1.6515,6.8473 1.6515,12.4014C1.6515,14.0845 2.0723,15.7676 2.8717,17.2403C2.998,17.4928 3.2504,17.619 3.545,17.619C3.6712,17.619 3.7974,17.5769 3.9236,17.5348C4.3023,17.3245 4.4286,16.8616 4.2182,16.525C3.5029,15.2627 3.1663,13.8321 3.1663,12.4014Z"
android:fillColor="#2E2F32"/>
android:fillColor="#2E2F32"
tools:fillColor="#FF0000"/>
<path
android:pathData="M20.6281,7.5626C20.4177,7.1839 19.9548,7.0577 19.6182,7.2681C19.2395,7.4785 19.1133,7.9413 19.3237,8.2779C19.9969,9.5402 20.3756,10.9288 20.3756,12.4015C20.3756,17.1562 16.5045,20.9852 11.7919,20.9852C10.4454,20.9852 9.099,20.6486 7.8787,20.0595H8.552C8.9727,20.0595 9.3094,19.7229 9.3094,19.3021C9.3094,18.8813 8.9727,18.5447 8.552,18.5447H6.2377C5.7328,18.5447 5.3541,18.9655 5.3541,19.4283V21.7426C5.3541,22.1633 5.6908,22.4999 6.1115,22.4999C6.5323,22.4999 6.8689,22.1633 6.8689,21.7426V21.1956C6.911,21.2376 6.9531,21.2376 6.9951,21.2797C8.4257,22.0792 10.0667,22.4999 11.7498,22.4999C17.304,22.4999 21.8483,17.9556 21.8483,12.4015C21.8483,10.7184 21.4275,9.0353 20.6281,7.5626Z"
android:fillColor="#2E2F32"/>
android:fillColor="#2E2F32"
tools:fillColor="#FF0000"/>
</group>
<path
android:pathData="M3,9C1.8954,9 1,9.8954 1,11V14C1,15.1046 1.8954,16 3,16H21C22.1046,16 23,15.1046 23,14V11C23,9.8954 22.1046,9 21,9H3ZM5.25,10.5C4.8358,10.5 4.5,10.8358 4.5,11.25C4.5,11.6642 4.8358,12 5.25,12H7.75C8.1642,12 8.5,11.6642 8.5,11.25C8.5,10.8358 8.1642,10.5 7.75,10.5H5.25ZM9.5,11.25C9.5,10.8358 9.8358,10.5 10.25,10.5H10.75C11.1642,10.5 11.5,10.8358 11.5,11.25C11.5,11.6642 11.1642,12 10.75,12H10.25C9.8358,12 9.5,11.6642 9.5,11.25ZM13.25,10.5C12.8358,10.5 12.5,10.8358 12.5,11.25C12.5,11.6642 12.8358,12 13.25,12H15.75C16.1642,12 16.5,11.6642 16.5,11.25C16.5,10.8358 16.1642,10.5 15.75,10.5H13.25ZM17.5,11.25C17.5,10.8358 17.8358,10.5 18.25,10.5H18.75C19.1642,10.5 19.5,10.8358 19.5,11.25C19.5,11.6642 19.1642,12 18.75,12H18.25C17.8358,12 17.5,11.6642 17.5,11.25ZM5.25,13C4.8358,13 4.5,13.3358 4.5,13.75C4.5,14.1642 4.8358,14.5 5.25,14.5H5.75C6.1642,14.5 6.5,14.1642 6.5,13.75C6.5,13.3358 6.1642,13 5.75,13H5.25ZM7.5,13.75C7.5,13.3358 7.8358,13 8.25,13H10.75C11.1642,13 11.5,13.3358 11.5,13.75C11.5,14.1642 11.1642,14.5 10.75,14.5H8.25C7.8358,14.5 7.5,14.1642 7.5,13.75ZM13.25,13C12.8358,13 12.5,13.3358 12.5,13.75C12.5,14.1642 12.8358,14.5 13.25,14.5H13.75C14.1642,14.5 14.5,14.1642 14.5,13.75C14.5,13.3358 14.1642,13 13.75,13H13.25Z"
android:fillColor="#2E2F32"
android:fillType="evenOdd"/>
android:fillType="evenOdd"
tools:fillColor="#FF0000"/>
</vector>
6 changes: 0 additions & 6 deletions vector/src/main/res/xml/vector_settings_root.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
app:fragment="im.vector.app.features.settings.VectorSettingsVoiceVideoFragment"
app:isPreferenceVisible="@bool/settings_root_voice_video_visible" />

<im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_ignored_users"
android:title="@string/settings_ignored_users"
app:fragment="im.vector.app.features.settings.ignored.VectorSettingsIgnoredUsersFragment"
app:isPreferenceVisible="@bool/settings_root_ignored_users_visible" />

<im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_security_privacy"
android:title="@string/settings_security_and_privacy"
Expand Down
13 changes: 13 additions & 0 deletions vector/src/main/res/xml/vector_settings_security_privacy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@

</im.vector.app.core.preference.VectorPreferenceCategory>

<im.vector.app.core.preference.VectorPreferenceCategory
android:key="SETTINGS_IGNORED_USERS_PREFERENCE_CATEGORY_KEY"
android:title="@string/settings_ignored_users"
app:isPreferenceVisible="@bool/settings_ignored_users_visible">

<im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_ignored_users"
android:key="SETTINGS_IGNORED_USERS_PREFERENCE_KEY"
android:title="@string/settings_ignored_users"
app:fragment="im.vector.app.features.settings.ignored.VectorSettingsIgnoredUsersFragment" />

</im.vector.app.core.preference.VectorPreferenceCategory>

<im.vector.app.core.preference.VectorPreferenceCategory
android:key="SETTINGS_ANALYTICS_PREFERENCE_KEY"
android:title="@string/settings_analytics">
Expand Down