PR remarks

This commit is contained in:
ariskotsomitopoulos 2022-05-16 13:32:30 +03:00
parent 40de685f1a
commit 72a945ac13
4 changed files with 13 additions and 9 deletions

View file

@ -138,7 +138,7 @@
<!-- Badge Colors -->
<attr name="vctr_badge_color_border" format="color" />
<color name="vctr_badge_color_border_light">#FFFFFF</color>
<color name="vctr_badge_color_border_dark">#21262C</color>
<color name="vctr_badge_color_border_light">@color/palette_white</color>
<color name="vctr_badge_color_border_dark">@color/palette_black_950</color>
</resources>

View file

@ -2443,7 +2443,11 @@ class TimelineFragment @Inject constructor(
private fun onReplyInThreadClicked(action: EventSharedAction.ReplyInThread) {
if (vectorPreferences.areThreadMessagesEnabled()) {
navigateToThreadTimeline(action.eventId, action.startsThread, true)
navigateToThreadTimeline(
rootThreadEventId = action.eventId,
startsThread = action.startsThread,
showKeyboard = true
)
} else {
displayThreadsBetaOptInDialog()
}

View file

@ -67,24 +67,24 @@ abstract class SearchResultItem : VectorEpoxyModel<SearchResultItem.Holder>() {
val displayName = it.threadSummarySenderInfo?.displayName
val avatarUrl = it.threadSummarySenderInfo?.avatarUrl
avatarRenderer.render(MatrixItem.UserItem(userId, displayName, avatarUrl), holder.threadSummaryAvatarImageView)
holder.threadSummaryConstraintLayout.onClick(threadSummaryListener)
holder.threadSummaryContainer.onClick(threadSummaryListener)
} else {
showFromThread(holder)
}
} ?: run {
holder.threadSummaryConstraintLayout.isVisible = false
holder.threadSummaryContainer.isVisible = false
holder.fromThreadConstraintLayout.isVisible = false
}
}
}
private fun showThreadSummary(holder: Holder, show: Boolean = true) {
holder.threadSummaryConstraintLayout.isVisible = show
holder.threadSummaryContainer.isVisible = show
holder.fromThreadConstraintLayout.isVisible = !show
}
private fun showFromThread(holder: Holder, show: Boolean = true) {
holder.threadSummaryConstraintLayout.isVisible = !show
holder.threadSummaryContainer.isVisible = !show
holder.fromThreadConstraintLayout.isVisible = show
}
@ -93,7 +93,7 @@ abstract class SearchResultItem : VectorEpoxyModel<SearchResultItem.Holder>() {
val memberNameView by bind<TextView>(R.id.messageMemberNameView)
val timeView by bind<TextView>(R.id.messageTimeView)
val contentView by bind<TextView>(R.id.messageContentView)
val threadSummaryConstraintLayout by bind<ConstraintLayout>(R.id.searchThreadSummaryConstraintLayout)
val threadSummaryContainer by bind<ConstraintLayout>(R.id.searchThreadSummaryContainer)
val threadSummaryCounterTextView by bind<TextView>(R.id.messageThreadSummaryCounterTextView)
val threadSummaryAvatarImageView by bind<ImageView>(R.id.messageThreadSummaryAvatarImageView)
val threadSummaryInfoTextView by bind<TextView>(R.id.messageThreadSummaryInfoTextView)

View file

@ -63,7 +63,7 @@
tools:text="@sample/messages.json/data/message" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/searchThreadSummaryConstraintLayout"
android:id="@+id/searchThreadSummaryContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"