From da5dcd18b0663a41a94c3b545e2dbbd5ff9a0f87 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Fri, 28 Oct 2022 18:24:14 +0200 Subject: [PATCH] Move voice message setting out of labs Having no voice message button is actually more thoroughly tested than the default setting... so let's put it to the other related settings Change-Id: I82fda959dd8d0798a59d0444cd0cecdcda6b8cd3 --- .../features/settings/VectorSettingsPreferencesFragment.kt | 3 +++ .../features/settings/labs/VectorSettingsLabsFragment.kt | 2 -- vector/src/main/res/xml/vector_settings_labs.xml | 6 ------ vector/src/main/res/xml/vector_settings_preferences.xml | 6 ++++++ 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPreferencesFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPreferencesFragment.kt index c47dbd920e..2d25fe6b51 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPreferencesFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPreferencesFragment.kt @@ -18,6 +18,7 @@ package im.vector.app.features.settings import android.content.Context import android.content.Intent +import android.os.Build import android.os.Bundle import androidx.lifecycle.lifecycleScope import androidx.preference.Preference @@ -83,6 +84,8 @@ class VectorSettingsPreferencesFragment : // user interface preferences setUserInterfacePreferences() + findPreference(VectorPreferences.SETTINGS_VOICE_MESSAGE)?.isEnabled = Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP + // Language: follow system findPreference(VectorPreferences.SETTINGS_FOLLOW_SYSTEM_LOCALE)?.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> diff --git a/vector/src/main/java/im/vector/app/features/settings/labs/VectorSettingsLabsFragment.kt b/vector/src/main/java/im/vector/app/features/settings/labs/VectorSettingsLabsFragment.kt index db512c791f..3c0bb19978 100644 --- a/vector/src/main/java/im/vector/app/features/settings/labs/VectorSettingsLabsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/labs/VectorSettingsLabsFragment.kt @@ -83,8 +83,6 @@ class VectorSettingsLabsFragment : findPreference(VectorPreferences.SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY)?.isEnabled = vectorPreferences.showUrlPreviews() - findPreference(VectorPreferences.SETTINGS_VOICE_MESSAGE)?.isEnabled = Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP - findPreference(VectorPreferences.SETTINGS_LABS_AUTO_REPORT_UISI)?.let { pref -> // ensure correct default pref.isChecked = vectorPreferences.labsAutoReportUISI() diff --git a/vector/src/main/res/xml/vector_settings_labs.xml b/vector/src/main/res/xml/vector_settings_labs.xml index f45682c3c1..205f3532e6 100644 --- a/vector/src/main/res/xml/vector_settings_labs.xml +++ b/vector/src/main/res/xml/vector_settings_labs.xml @@ -43,12 +43,6 @@ android:title="@string/url_previews_in_encrypted_rooms" android:summary="@string/url_previews_in_encrypted_rooms_summary" /> - - + +