mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
PR remarks
This commit is contained in:
parent
40de685f1a
commit
72a945ac13
@ -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>
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user