Add domain to comments

This commit is contained in:
Matthieu 2022-08-03 13:32:13 +02:00
parent 07168c1c1f
commit 88ac02150c
4 changed files with 23 additions and 10 deletions

View File

@ -173,6 +173,8 @@ class PostActivity : BaseThemedWithBarActivity() {
lifecycleScope
)
binding.postDomain.text = comment.getStatusDomain(domain, binding.postDomain.context)
if(comment.replies_count == 0 || comment.replies_count == null){
binding.replies.visibility = View.GONE
} else {

View File

@ -99,15 +99,13 @@
tools:listitem="@layout/comment" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<ProgressBar
android:id="@+id/postCommentsProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/errorLayout" />
</androidx.constraintlayout.motion.widget.MotionLayout>
<ProgressBar
android:id="@+id/postCommentsProgressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
app:layout_anchor="@id/motionLayout" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -34,6 +34,17 @@
app:layout_constraintTop_toTopOf="parent"
tools:text="username" />
<TextView
android:id="@+id/postDomain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textColor="@color/domainGray"
app:layout_constraintBottom_toBottomOf="@+id/user"
app:layout_constraintStart_toEndOf="@+id/user"
app:layout_constraintTop_toTopOf="@+id/user"
tools:text="from domain.tld" />
<TextView
android:id="@+id/commentText"
android:layout_width="0dp"

View File

@ -6,6 +6,8 @@
<color name="white">#FFFFFF</color>
<color name="domainGray">#b3b3b3</color>
<!-- > Following are theme color values </-->
<color name="seed">#f4a261</color>
<color name="md_theme_light_primary">#924C00</color>