diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/ScMessageBubbleWrapView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/ScMessageBubbleWrapView.kt index 583b2f8180..a76fb4ff8d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/ScMessageBubbleWrapView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/ScMessageBubbleWrapView.kt @@ -54,7 +54,6 @@ class ScMessageBubbleWrapView @JvmOverloads constructor(context: Context, attrs: override fun onFinishInflate() { super.onFinishInflate() views = ViewMessageBubbleScBinding.bind(this) - // SC-TODO ... ? } fun customBind( 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 3badbc3816..026f973dd9 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 @@ -246,6 +246,6 @@ class VectorSettingsPreferencesFragment @Inject constructor( private fun updateBubbleDependencies(bubbleStyle: String) { //bubbleTimeLocationPref?.setEnabled(BubbleThemeUtils.isBubbleTimeLocationSettingAllowed(bubbleStyle)) - alwaysShowTimestampsPref?.setEnabled(!bubbleThemeUtils.forceAlwaysShowTimestamps(bubbleStyle)) + alwaysShowTimestampsPref?.setEnabled(bubbleStyle in listOf(BubbleThemeUtils.BUBBLE_STYLE_NONE, BubbleThemeUtils.BUBBLE_STYLE_START)) } } diff --git a/vector/src/main/java/im/vector/app/features/themes/BubbleThemeUtils.kt b/vector/src/main/java/im/vector/app/features/themes/BubbleThemeUtils.kt index 1d2cbb81d3..d0ebe7f34d 100644 --- a/vector/src/main/java/im/vector/app/features/themes/BubbleThemeUtils.kt +++ b/vector/src/main/java/im/vector/app/features/themes/BubbleThemeUtils.kt @@ -16,7 +16,6 @@ import javax.inject.Inject class BubbleThemeUtils @Inject constructor(private val context: Context) { companion object { const val BUBBLE_STYLE_KEY = "BUBBLE_STYLE_KEY" - const val BUBBLE_TIME_LOCATION_KEY = "BUBBLE_TIME_LOCATION_KEY" const val BUBBLE_STYLE_NONE = "none" const val BUBBLE_STYLE_ELEMENT = "element" @@ -49,15 +48,6 @@ class BubbleThemeUtils @Inject constructor(private val context: Context) { } } - // Special case of BUBBLE_STYLE_BOTH, to allow non-bubble items align to the sender either way - // (not meant for user setting, but internal use) - //const val BUBBLE_STYLE_BOTH_HIDDEN = "both_hidden" - // As above, so for single bubbles side - //const val BUBBLE_STYLE_START_HIDDEN = "start_hidden" - - //private var mBubbleStyle: String = "" - //private var mBubbleTimeLocation: String = "" - fun getBubbleStyle(): String { val bubbleStyle = PreferenceManager.getDefaultSharedPreferences(context).getString(BUBBLE_STYLE_KEY, BUBBLE_STYLE_BOTH)!! if (bubbleStyle !in listOf(BUBBLE_STYLE_NONE, BUBBLE_STYLE_START, BUBBLE_STYLE_BOTH, BUBBLE_STYLE_ELEMENT)) { @@ -72,31 +62,6 @@ class BubbleThemeUtils @Inject constructor(private val context: Context) { PreferenceManager.getDefaultSharedPreferences(context).edit().putString(BUBBLE_STYLE_KEY, value).apply() } - /* SC-TODO - fun drawsActualBubbles(bubbleStyle: String): Boolean { - return bubbleStyle == BUBBLE_STYLE_START || bubbleStyle == BUBBLE_STYLE_BOTH - } - - fun drawsDualSide(bubbleStyle: String): Boolean { - return bubbleStyle == BUBBLE_STYLE_BOTH || bubbleStyle == BUBBLE_STYLE_BOTH_HIDDEN - } - */ - - fun forceAlwaysShowTimestamps(bubbleStyle: String): Boolean { - return isBubbleTimeLocationSettingAllowed(bubbleStyle) - } - - fun isBubbleTimeLocationSettingAllowed(bubbleStyle: String): Boolean { - return bubbleStyle == BUBBLE_STYLE_BOTH // SC-TODO? || bubbleStyle == BUBBLE_STYLE_BOTH_HIDDEN - } - - fun forceAlwaysShowTimestamps(): Boolean { - return forceAlwaysShowTimestamps(getBubbleStyle()) - } - - fun isBubbleTimeLocationSettingAllowed(): Boolean { - return isBubbleTimeLocationSettingAllowed(getBubbleStyle()) - } } fun guessTextWidth(view: TextView): Float {