Skip to content

Commit

Permalink
Fix: layout visibility and constraint in Talk page thread item view (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cooltey authored May 19, 2022
1 parent 65a8456 commit 145b432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/org/wikipedia/talk/TalkThreadItemView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class TalkThreadItemView constructor(context: Context, attrs: AttributeSet? = nu
this.item = item
binding.userNameText.text = item.author
binding.userNameTap_target.contentDescription = binding.userNameText.text
binding.userNameText.isVisible = item.author.isNotEmpty()
binding.userNameTap_target.isVisible = binding.userNameText.isVisible
binding.profileImage.visibility = if (binding.userNameText.isVisible) View.VISIBLE else View.INVISIBLE
binding.timeStampText.isVisible = item.date != null
item.date?.let { binding.timeStampText.text = DateUtil.getDateAndTimeWithPipe(it) }
binding.bodyText.text = StringUtil.fromHtml(item.html).trim()
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/item_talk_thread_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/timeStampText"
app:layout_constraintStart_toStartOf="@id/timeStampText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/profileImage"
app:layout_constraintEnd_toStartOf="@id/overflowButton"
android:layout_marginStart="4dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="16dp"
android:textColor="?attr/material_theme_primary_color"
Expand All @@ -104,7 +105,6 @@
app:layout_constraintStart_toStartOf="@id/bodyText"
app:layout_constraintBottom_toTopOf="@id/showRepliesContainer"
android:layout_marginTop="6dp"
android:layout_marginStart="-4dp"
android:layout_marginBottom="16dp"
android:text="@string/talk_add_reply"
android:textColor="@android:color/white"
Expand Down

0 comments on commit 145b432

Please sign in to comment.
  NODES
COMMUNITY 1
Note 2
Project 1
USERS 1