Skip to content

Commit fe86431

Browse files
committed
Revert "fix alignment of author name and date when image is gone"
This reverts commit 2312ec2.
1 parent 2312ec2 commit fe86431

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentRepliesFragment.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,8 @@ protected Supplier<View> getListHeaderSupplier() {
8585

8686
// load the author avatar
8787
PicassoHelper.loadAvatar(item.getUploaderAvatars()).into(binding.authorAvatar);
88-
if (ImageStrategy.shouldLoadImages()) {
89-
binding.authorAvatar.setVisibility(View.VISIBLE);
90-
} else {
91-
binding.authorAvatar.setVisibility(View.GONE);
92-
((ConstraintLayout.LayoutParams) binding.authorName.getLayoutParams())
93-
.setMarginStart(DeviceUtils.dpToPx(16, requireContext()));
94-
}
88+
binding.authorAvatar.setVisibility(ImageStrategy.shouldLoadImages()
89+
? View.VISIBLE : View.GONE);
9590

9691
// setup author name and comment date
9792
binding.authorName.setText(item.getUploaderName());

app/src/main/res/layout/comment_replies_header.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,29 @@
2424
android:layout_height="wrap_content"
2525
android:layout_marginStart="8dp"
2626
android:layout_marginEnd="8dp"
27-
android:layout_marginTop="16dp"
2827
android:ellipsize="end"
2928
android:lines="1"
3029
android:textAppearance="?android:attr/textAppearanceLarge"
3130
android:textSize="16sp"
3231
app:layout_constraintBottom_toTopOf="@+id/uploadDate"
3332
app:layout_constraintEnd_toStartOf="@+id/thumbsUpImage"
3433
app:layout_constraintStart_toEndOf="@+id/authorAvatar"
35-
app:layout_constraintTop_toTopOf="parent"
34+
app:layout_constraintTop_toTopOf="@+id/authorAvatar"
3635
tools:text="@tools:sample/lorem/random" />
3736

3837
<org.schabi.newpipe.views.NewPipeTextView
3938
android:id="@+id/uploadDate"
4039
android:layout_width="0dp"
4140
android:layout_height="wrap_content"
41+
android:layout_marginStart="8dp"
4242
android:layout_marginEnd="8dp"
4343
android:ellipsize="end"
4444
android:lines="1"
4545
android:textAppearance="?android:attr/textAppearanceSmall"
4646
android:textSize="14sp"
47+
app:layout_constraintBottom_toBottomOf="@+id/authorAvatar"
4748
app:layout_constraintEnd_toStartOf="@+id/thumbsUpImage"
48-
app:layout_constraintStart_toStartOf="@+id/authorName"
49+
app:layout_constraintStart_toEndOf="@+id/authorAvatar"
4950
app:layout_constraintTop_toBottomOf="@+id/authorName"
5051
tools:text="5 months ago" />
5152

0 commit comments

Comments
 (0)