feat(creator): 커뮤니티 상세 작성자 채널 이동을 추가한다
This commit is contained in:
+6
@@ -35,6 +35,7 @@ import kr.co.vividnext.sodalive.explorer.profile.creator_community.modify.Creato
|
||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||
import kr.co.vividnext.sodalive.v2.components.modal.V2ModalDialog
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.CreatorChannelActivity
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.reply.CreatorChannelCommunityReplyActivity
|
||||
import kr.co.vividnext.sodalive.v2.creator.channel.community.detail.ui.CreatorChannelCommunityCommentAdapter
|
||||
import kr.co.vividnext.sodalive.v2.widget.feed.calculateFeedCommunityImageHeight
|
||||
@@ -174,6 +175,11 @@ class CreatorChannelCommunityDetailActivity : BaseActivity<ActivityCreatorChanne
|
||||
tvCreatorChannelCommunityDetailNickname.text = post.creatorNickname
|
||||
tvCreatorChannelCommunityDetailTime.text =
|
||||
formatUtcRelativeTimeText(tvCreatorChannelCommunityDetailTime.context, post.createdAtUtc)
|
||||
layoutCreatorChannelCommunityDetailCreator.setOnClickListener {
|
||||
startActivity(
|
||||
CreatorChannelActivity.newIntent(this@CreatorChannelCommunityDetailActivity, post.creatorId)
|
||||
)
|
||||
}
|
||||
btnCreatorChannelCommunityDetailMore.isVisible = post.showMore
|
||||
tvCreatorChannelCommunityDetailBody.text = post.content
|
||||
layoutCreatorChannelCommunityDetailReaction.isVisible = post.showReaction || content.isCommentAvailable
|
||||
|
||||
@@ -53,43 +53,53 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_creator_channel_community_detail_profile"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:contentDescription="@string/a11y_feed_profile_image"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/bg_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_creator_channel_community_detail_nickname"
|
||||
style="@style/Typography.Body5"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_creator_channel_community_detail_creator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_creator_channel_community_detail_more"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_creator_channel_community_detail_profile"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_detail_profile"
|
||||
tools:text="크리에이터" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_creator_channel_community_detail_time"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/gray_500"
|
||||
app:layout_constraintEnd_toEndOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
tools:text="2분 전" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_creator_channel_community_detail_profile"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:contentDescription="@string/a11y_feed_profile_image"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/bg_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_creator_channel_community_detail_nickname"
|
||||
style="@style/Typography.Body5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_creator_channel_community_detail_profile"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_detail_profile"
|
||||
tools:text="크리에이터" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_creator_channel_community_detail_time"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/gray_500"
|
||||
app:layout_constraintEnd_toEndOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_creator_channel_community_detail_nickname"
|
||||
tools:text="2분 전" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_creator_channel_community_detail_more"
|
||||
|
||||
+14
@@ -125,6 +125,20 @@ class CreatorChannelCommunityDetailContractTest {
|
||||
assertEquals(CreatorChannelCommunityRepliesResponse(listOf(reply), 0, 20, false).replies.first(), reply)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `커뮤니티 상세 작성자 영역은 하나의 클릭으로 크리에이터 채널을 연다`() {
|
||||
val layout = projectFile("app/src/main/res/layout/activity_creator_channel_community_detail.xml").readText()
|
||||
val activity = projectFile(
|
||||
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/detail/" +
|
||||
"CreatorChannelCommunityDetailActivity.kt"
|
||||
).readText()
|
||||
|
||||
assertTrue(layout.contains("@+id/layout_creator_channel_community_detail_creator"))
|
||||
assertTrue(activity.contains("layoutCreatorChannelCommunityDetailCreator.setOnClickListener"))
|
||||
assertTrue(activity.contains("CreatorChannelActivity.newIntent("))
|
||||
assertTrue(activity.contains("post.creatorId"))
|
||||
}
|
||||
|
||||
private fun projectFile(path: String): File {
|
||||
var current = File(checkNotNull(System.getProperty("user.dir"))).absoluteFile
|
||||
while (current.parentFile != null && !File(current, "settings.gradle").exists()) {
|
||||
|
||||
Reference in New Issue
Block a user