Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/resource/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<string name="feed_popup_menu_content_report_isNotMyFeed">스포일러 신고, 부적절한 표현 신고</string>
<string name="feed_popup_menu_content_isMyFeed">수정하기, 삭제하기</string>
<string name="feed_title">소소피드</string>
<string name="feed_spoiler_label">스포일러가 포함된 글</string>
<string name="feed_spoiler_warning">스포일러가 포함된 글 보기</string>
<string name="feed_category_male">전체,판타지,현판,무협,드라마,미스터리,라노벨,로맨스,로판,BL,기타</string>
<string name="feed_category_female">전체,로맨스,로판,BL,판타지,현판,무협,드라마,미스터리,라노벨,기타</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
Expand Down Expand Up @@ -256,9 +258,9 @@ private fun FeedItem(

Spacer(modifier = Modifier.height(height = 10.dp))

if (feed.isSpoiler) {
if (feed.isSpoiler && !feed.isMyFeed) {
Text(
text = "스포일러가 포함된 글 보기",
text = stringResource(R.string.feed_spoiler_warning),
style = WebsosoTheme.typography.body2,
color = Secondary100,
modifier = Modifier.debouncedClickable { onContentClick(feed.id, feed.isLiked) },
Expand Down Expand Up @@ -320,35 +322,18 @@ private fun FeedItem(

Spacer(modifier = Modifier.height(height = 10.dp))

when (feed.isPublic) {
false -> {
Row(
horizontalArrangement = Arrangement.spacedBy(space = 6.dp),
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 10.dp),
) {
Icon(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_lock),
contentDescription = null,
tint = Gray200,
)

Text(
text = "나만 보는 기록이에요.",
style = WebsosoTheme.typography.body4,
color = Gray200,
)
}
}

true -> {
val showSpoilerLabel = feed.isMyFeed && feed.isSpoiler
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.then(if (showSpoilerLabel) Modifier.heightIn(min = 37.dp) else Modifier.padding(vertical = 10.dp)),
) {
if (feed.isPublic) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(space = 18.dp),
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 10.dp),
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.weight(1f),
) {
Row(
horizontalArrangement = Arrangement.spacedBy(space = 4.dp),
Expand Down Expand Up @@ -387,6 +372,34 @@ private fun FeedItem(
)
}
}
} else {
Row(
horizontalArrangement = Arrangement.spacedBy(space = 6.dp),
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.weight(1f),
) {
Icon(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_lock),
contentDescription = null,
tint = Gray200,
)

Text(
text = "나만 보는 기록이에요.",
style = WebsosoTheme.typography.body4,
color = Gray200,
)
}
}

if (showSpoilerLabel) {
Text(
text = stringResource(R.string.feed_spoiler_label),
style = WebsosoTheme.typography.body4,
color = Secondary100,
textAlign = TextAlign.End,
modifier = Modifier.width(110.dp),
)
}
}

Expand Down
Loading