Fix permalink handling for threads regarding timeline changes

This commit is contained in:
ariskotsomitopoulos 2022-01-14 13:02:08 +02:00
parent 53fecef2d4
commit 53b82dfa3f
6 changed files with 14 additions and 10 deletions

View file

@ -239,7 +239,10 @@ internal class DefaultTimeline(private val roomId: String,
else -> buildStrategy(LoadTimelineStrategy.Mode.Permalink(eventId))
}
initPaginationStates(eventId)
rootThreadEventId?.let {
initPaginationStates(null)
} ?: initPaginationStates(eventId)
strategy.onStart()
loadMore(
count = strategyDependencies.timelineSettings.initialSize,

View file

@ -60,7 +60,7 @@ abstract class ThreadListModel : VectorEpoxyModel<ThreadListModel.Holder>() {
holder.dateTextView.text = date
if (rootMessageDeleted) {
holder.rootMessageTextView.text = holder.view.context.getString(R.string.event_redacted)
holder.rootMessageTextView.setLeftDrawable(R.drawable.ic_trash_16, R.attr.colorOnPrimary)
holder.rootMessageTextView.setLeftDrawable(R.drawable.ic_trash_16, R.attr.vctr_content_tertiary)
holder.rootMessageTextView.compoundDrawablePadding = DimensionConverter(holder.view.context.resources).dpToPx(10)
} else {
holder.rootMessageTextView.text = rootMessage

View file

@ -45,7 +45,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="25dp"
android:layout_marginEnd="28dp"
android:gravity="end"
android:maxLines="1"
android:textColor="?vctr_content_secondary"
@ -73,6 +73,7 @@
style="@style/Widget.Vector.TextView.Body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginEnd="25dp"
android:ellipsize="end"
android:maxLines="2"
@ -91,7 +92,7 @@
android:maxWidth="496dp"
android:minWidth="144dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingBottom="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/threadSummaryTitleTextView"
app:layout_constraintTop_toBottomOf="@id/threadSummaryRootMessageTextView"

View file

@ -205,8 +205,8 @@
android:contentDescription="@string/room_threads_filter"
android:maxWidth="496dp"
android:minWidth="144dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:visibility="gone"
tools:visibility="visible">

View file

@ -37,7 +37,7 @@
<TextView
android:id="@+id/roomToolbarThreadSubtitleTextView"
style="@style/Widget.Vector.TextView.Body"
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"

View file

@ -20,19 +20,19 @@
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginStart="4dp"
android:minEms="1"
android:textColor="?vctr_content_secondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/messageThreadSummaryImageView"
app:layout_constraintTop_toTopOf="parent"
tools:text="192" />
tools:text="123" />
<ImageView
android:id="@+id/messageThreadSummaryAvatarImageView"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="13dp"
android:layout_marginStart="4dp"
android:contentDescription="@string/avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/messageThreadSummaryCounterTextView"