Skip to content

Commit 1b88841

Browse files
nbradburyclaude
andcommitted
Remove duplicate like count text, use faces train only
The like count was shown twice: once as a standalone TextView below the tags and again as a trailing label in the liker faces train. Remove the standalone header_like_count TextView and let the faces train be the sole display of like count and liker avatars. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 61fa8e5 commit 1b88841

File tree

3 files changed

+2
-36
lines changed

3 files changed

+2
-36
lines changed

WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostDetailFragment.kt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ import org.wordpress.android.ui.reader.tracker.ReaderTracker.Companion.SOURCE_PO
108108
import org.wordpress.android.ui.reader.usecases.ReaderGetReadingPreferencesSyncUseCase
109109
import org.wordpress.android.ui.reader.utils.ReaderUtils
110110
import org.wordpress.android.ui.reader.utils.ReaderUtilsWrapper
111-
import org.wordpress.android.ui.reader.views.uistates.InteractionSectionUiState
112111
import org.wordpress.android.ui.reader.utils.ReaderVideoUtils
113112
import org.wordpress.android.ui.reader.viewmodels.ConversationNotificationsViewModel
114113
import org.wordpress.android.ui.reader.viewmodels.ReaderPostDetailViewModel
@@ -794,10 +793,6 @@ class ReaderPostDetailFragment : ViewPagerFragment(),
794793
state.headerUiState.tagItems, getReadingPreferences()
795794
)
796795

797-
updateInteractionSection(
798-
binding, state.headerUiState.interactionSectionUiState
799-
)
800-
801796
showOrHideMoreMenu(state)
802797

803798
updateExcerptFooter(state.excerptFooterUiState)
@@ -813,20 +808,6 @@ class ReaderPostDetailFragment : ViewPagerFragment(),
813808
state.globalRelatedPosts?.let { showRelatedPosts(it) }
814809
}
815810

816-
private fun updateInteractionSection(
817-
binding: ReaderFragmentPostDetailBinding,
818-
state: InteractionSectionUiState,
819-
) {
820-
val likeLabel = ReaderUtils
821-
.getShortLikeLabelText(requireContext(), state.likeCount)
822-
.takeIf { state.likeCount > 0 }
823-
824-
uiHelpers.setTextOrHide(binding.headerLikeCount, likeLabel)
825-
binding.headerLikeCount.setOnClickListener {
826-
state.onLikesClicked()
827-
}
828-
}
829-
830811
// TODO: Update using UiState/ NavigationEvent
831812
@Suppress("ForbiddenComment")
832813
private fun onPostExecuteShowPost() {

WordPress/src/main/java/org/wordpress/android/ui/reader/views/ReaderPostDetailsHeaderViewUiStateBuilder.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ class ReaderPostDetailsHeaderViewUiStateBuilder @Inject constructor(
180180
companion object {
181181
private val IMG_TAG_REGEX = Regex("<img[^>]*>")
182182
private val WHITESPACE_REGEX = "\\s+".toRegex()
183-
private const val DATE_FORMAT_PATTERN =
184-
"MMM d, yyyy"
183+
private const val DATE_FORMAT_PATTERN = "MMM d, yyyy"
185184
}
186185
}

WordPress/src/main/res/layout/reader_fragment_post_detail.xml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,11 @@
6262
android:visibility="gone"
6363
tools:ignore="UnknownIdInLayout" />
6464

65-
<!-- like count -->
66-
<com.google.android.material.textview.MaterialTextView
67-
android:id="@+id/header_like_count"
68-
style="@style/ReaderTextView.Post.New.Interactions"
69-
android:layout_width="match_parent"
70-
android:layout_height="wrap_content"
71-
android:layout_below="@+id/expandable_tags_view"
72-
android:layout_alignStart="@+id/layout_post_detail_content"
73-
android:layout_alignEnd="@+id/layout_post_detail_content"
74-
android:layout_marginTop="@dimen/margin_medium"
75-
android:visibility="gone"
76-
tools:ignore="UnknownIdInLayout"
77-
tools:text="15 likes" />
78-
7965
<include
8066
layout="@layout/reader_post_likers_faces_list"
8167
android:layout_width="match_parent"
8268
android:layout_height="wrap_content"
83-
android:layout_below="@+id/header_like_count" />
69+
android:layout_below="@+id/expandable_tags_view" />
8470

8571
<include
8672
android:id="@+id/comments_snippet"

0 commit comments

Comments
 (0)