mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Open thread timeline keyboard when user navigates from reply in thread action
This commit is contained in:
parent
88babbb17c
commit
f4b1e06ad1
@ -1517,7 +1517,7 @@ class TimelineFragment @Inject constructor(
|
||||
|
||||
views.composerLayout.views.composerEmojiButton.isVisible = vectorPreferences.showEmojiKeyboard()
|
||||
|
||||
if (isThreadTimeLine() && timelineArgs.threadTimelineArgs?.startsThread == true) {
|
||||
if (isThreadTimeLine() && timelineArgs.threadTimelineArgs?.showKeyboard == true) {
|
||||
// Show keyboard when the user started a thread
|
||||
views.composerLayout.views.composerEditText.showKeyboard(andRequestFocus = true)
|
||||
}
|
||||
@ -2422,7 +2422,7 @@ class TimelineFragment @Inject constructor(
|
||||
|
||||
private fun onReplyInThreadClicked(action: EventSharedAction.ReplyInThread) {
|
||||
if (vectorPreferences.areThreadMessagesEnabled()) {
|
||||
navigateToThreadTimeline(action.eventId, action.startsThread)
|
||||
navigateToThreadTimeline(action.eventId, action.startsThread, true)
|
||||
} else {
|
||||
displayThreadsBetaOptInDialog()
|
||||
}
|
||||
@ -2433,7 +2433,7 @@ class TimelineFragment @Inject constructor(
|
||||
* using the ThreadsActivity
|
||||
*/
|
||||
|
||||
private fun navigateToThreadTimeline(rootThreadEventId: String, startsThread: Boolean = false) {
|
||||
private fun navigateToThreadTimeline(rootThreadEventId: String, startsThread: Boolean = false, showKeyboard: Boolean = false) {
|
||||
analyticsTracker.capture(Interaction.Name.MobileRoomThreadSummaryItem.toAnalyticsInteraction())
|
||||
context?.let {
|
||||
val roomThreadDetailArgs = ThreadTimelineArgs(
|
||||
@ -2442,7 +2442,9 @@ class TimelineFragment @Inject constructor(
|
||||
displayName = timelineViewModel.getRoomSummary()?.displayName,
|
||||
avatarUrl = timelineViewModel.getRoomSummary()?.avatarUrl,
|
||||
roomEncryptionTrustLevel = timelineViewModel.getRoomSummary()?.roomEncryptionTrustLevel,
|
||||
rootThreadEventId = rootThreadEventId)
|
||||
rootThreadEventId = rootThreadEventId,
|
||||
showKeyboard = showKeyboard
|
||||
)
|
||||
navigator.openThread(it, roomThreadDetailArgs)
|
||||
}
|
||||
}
|
||||
|
@ -27,5 +27,6 @@ data class ThreadTimelineArgs(
|
||||
val avatarUrl: String?,
|
||||
val roomEncryptionTrustLevel: RoomEncryptionTrustLevel?,
|
||||
val rootThreadEventId: String? = null,
|
||||
val startsThread: Boolean = false
|
||||
val startsThread: Boolean = false,
|
||||
val showKeyboard: Boolean = false
|
||||
) : Parcelable
|
||||
|
Loading…
Reference in New Issue
Block a user