diff --git a/changelog.d/5029.bugfix b/changelog.d/5029.bugfix
new file mode 100644
index 0000000000..9e8bbd7b7b
--- /dev/null
+++ b/changelog.d/5029.bugfix
@@ -0,0 +1 @@
+Disable emoji keyboard not applies in reply
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
index f164183914..f67dca48f6 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
@@ -353,6 +353,8 @@ class TimelineFragment @Inject constructor(
private var lockSendButton = false
private val currentCallsViewPresenter = CurrentCallsViewPresenter()
+ private val isEmojiKeyboardVisible: Boolean
+ get() = vectorPreferences.showEmojiKeyboard()
private val lazyLoadedViews = RoomDetailLazyLoadedViews()
private val emojiPopup: EmojiPopup by lifecycleAwareLazy {
@@ -1571,6 +1573,10 @@ class TimelineFragment @Inject constructor(
attachmentTypeSelector.show(views.composerLayout.views.attachmentButton)
}
+ override fun onExpandOrCompactChange() {
+ views.composerLayout.views.composerEmojiButton.isVisible = isEmojiKeyboardVisible
+ }
+
override fun onSendMessage(text: CharSequence) {
sendTextMessage(text)
}
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt
index 1522960cc9..b1b2c87e9c 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt
@@ -46,6 +46,7 @@ class MessageComposerView @JvmOverloads constructor(
fun onCloseRelatedMessage()
fun onSendMessage(text: CharSequence)
fun onAddAttachment()
+ fun onExpandOrCompactChange()
}
val views: ComposerLayoutBinding
@@ -96,6 +97,7 @@ class MessageComposerView @JvmOverloads constructor(
}
currentConstraintSetId = R.layout.composer_layout_constraint_set_compact
applyNewConstraintSet(animate, transitionComplete)
+ callback?.onExpandOrCompactChange()
}
fun expand(animate: Boolean = true, transitionComplete: (() -> Unit)? = null) {
@@ -105,6 +107,7 @@ class MessageComposerView @JvmOverloads constructor(
}
currentConstraintSetId = R.layout.composer_layout_constraint_set_expanded
applyNewConstraintSet(animate, transitionComplete)
+ callback?.onExpandOrCompactChange()
}
fun setTextIfDifferent(text: CharSequence?): Boolean {
diff --git a/vector/src/main/res/layout/composer_layout.xml b/vector/src/main/res/layout/composer_layout.xml
index bed10f7606..fb0d80278a 100644
--- a/vector/src/main/res/layout/composer_layout.xml
+++ b/vector/src/main/res/layout/composer_layout.xml
@@ -119,8 +119,10 @@
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@string/a11y_open_emoji_picker"
android:src="@drawable/ic_insert_emoji"
+ android:visibility="invisible"
app:tint="?vctr_content_tertiary"
- tools:ignore="MissingConstraints,MissingPrefix" />
+ tools:ignore="MissingConstraints,MissingPrefix"
+ tools:visibility="visible" />
+ tools:ignore="MissingPrefix"
+ tools:visibility="visible" />
+ tools:ignore="MissingPrefix"
+ tools:visibility="visible" />