diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt index 6a4b5484eb..352c5768fb 100755 --- a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt @@ -20,6 +20,7 @@ import android.content.SharedPreferences import android.media.RingtoneManager import android.net.Uri import android.provider.MediaStore +import androidx.annotation.BoolRes import androidx.core.content.edit import com.squareup.seismic.ShakeDetector import im.vector.app.BuildConfig @@ -300,6 +301,8 @@ class VectorPreferences @Inject constructor(private val context: Context) { } } + private fun getDefault(@BoolRes resId: Int) = context.resources.getBoolean(resId) + fun areNotificationEnabledForDevice(): Boolean { return defaultPrefs.getBoolean(SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY, true) } @@ -856,7 +859,7 @@ class VectorPreferences @Inject constructor(private val context: Context) { * @return true to show timeline message in bubble. */ fun useMessageBubblesLayout(): Boolean { - return defaultPrefs.getBoolean(SETTINGS_INTERFACE_BUBBLE_KEY, false) + return defaultPrefs.getBoolean(SETTINGS_INTERFACE_BUBBLE_KEY, getDefault(R.bool.settings_interface_bubble_default)) } /** diff --git a/vector/src/main/res/values/config.xml b/vector/src/main/res/values/config.xml index 78b92cbfa4..b419477c1f 100755 --- a/vector/src/main/res/values/config.xml +++ b/vector/src/main/res/values/config.xml @@ -40,4 +40,9 @@ riot.im + + + + false + diff --git a/vector/src/main/res/xml/vector_settings_preferences.xml b/vector/src/main/res/xml/vector_settings_preferences.xml index 061674c049..b782a60749 100644 --- a/vector/src/main/res/xml/vector_settings_preferences.xml +++ b/vector/src/main/res/xml/vector_settings_preferences.xml @@ -83,7 +83,7 @@