diff --git a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultController.kt b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultController.kt index 9baddfd309..35adf344f3 100644 --- a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultController.kt +++ b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultController.kt @@ -23,10 +23,12 @@ import im.vector.app.R import im.vector.app.core.resources.StringProvider import im.vector.app.core.ui.list.genericFooterItem import im.vector.app.features.reactions.data.EmojiItem +import im.vector.app.features.settings.VectorPreferences import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence import javax.inject.Inject class EmojiSearchResultController @Inject constructor( + private val vectorPreferences: VectorPreferences, private val stringProvider: StringProvider, private val fontProvider: EmojiCompatFontProvider ) : TypedEpoxyController() { @@ -49,18 +51,20 @@ class EmojiSearchResultController @Inject constructor( val results = data?.results ?: return val host = this - // Extra EmojiItem to allow reacting with freeform text - val freeformReaction = EmojiItem( - name = stringProvider.getString(R.string.freeform_react_with, data.query), - unicode = "", - keywords = listOf(stringProvider.getString(R.string.freeform_reaction_summary)) - ) - emojiSearchResultItem { - id("de.spiritcroc.riotx.freeform-reaction-is-somebody-really-caring-about-this-key-lol") - emojiItem(freeformReaction) - emojiTypeFace(host.emojiTypeface) - currentQuery(data.query) - onClickListener { host.listener?.onReactionSelected(data.query) } + if (!vectorPreferences.simplifiedMode()) { + // Extra EmojiItem to allow reacting with freeform text + val freeformReaction = EmojiItem( + name = stringProvider.getString(R.string.freeform_react_with, data.query), + unicode = "", + keywords = listOf(stringProvider.getString(R.string.freeform_reaction_summary)) + ) + emojiSearchResultItem { + id("de.spiritcroc.riotx.freeform-reaction-is-somebody-really-caring-about-this-key-lol") + emojiItem(freeformReaction) + emojiTypeFace(host.emojiTypeface) + currentQuery(data.query) + onClickListener { host.listener?.onReactionSelected(data.query) } + } } if (results.isEmpty()) {