Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ fun CollectionFileItem(
.padding(horizontal = 8.dp),
) {
Text(
text = collection.title,
text = collection.title.addKoreanLineBreaks(),
style = FlintTheme.typography.body1M16,
color = FlintTheme.colors.white,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
)

Text(
text = collection.description,
text = collection.description.addKoreanLineBreaks(),
style = FlintTheme.typography.caption1R12,
color = FlintTheme.colors.gray300,
maxLines = 2,
Expand Down Expand Up @@ -208,6 +208,13 @@ private fun CollectionPocketPoster(
)
}

private fun String.addKoreanLineBreaks(): String = buildString {
for (char in this@addKoreanLineBreaks) {
append(char)
if (char.code in 0xAC00..0xD7A3) append('​')
}
}

@Preview(showBackground = false)
@Composable
private fun CollectionFileItemPreview() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import com.flint.core.designsystem.component.button.FlintLargeButton
import com.flint.core.designsystem.component.image.SelectedContentItem
import com.flint.core.designsystem.component.textfield.FlintSearchTextField
import com.flint.core.designsystem.component.topappbar.FlintBackTopAppbar
import com.flint.core.designsystem.component.indicator.FlintLoadingIndicator
import com.flint.core.designsystem.component.view.FlintSearchEmptyView
import com.flint.core.designsystem.theme.FlintTheme
import com.flint.domain.model.search.SearchContentItemModel
Expand Down Expand Up @@ -296,7 +297,16 @@ fun OnboardingContentScreen(
}
}
is UiState.Loading -> {
// 로딩
item(span = { GridItemSpan(3) }) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(300.dp),
contentAlignment = Alignment.Center,
) {
FlintLoadingIndicator()
}
}
}
is UiState.Success -> {
if (searchResultsState.data.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fun OnboardingContentItem(

// 영화 제목
Text(
text = title,
text = title.addKoreanLineBreaks(),
style = FlintTheme.typography.body1R16,
color = FlintTheme.colors.white,
maxLines = 2,
Expand Down Expand Up @@ -115,6 +115,15 @@ fun OnboardingContentItem(
}
}

// 한글 음절 사이에 zero-width space(U+200B)를 삽입해 줄바꿈 기회를 추가
// → 공간이 남아있으면 단어 경계가 아닌 글자 경계에서 줄바꿈 가능
private fun String.addKoreanLineBreaks(): String = buildString {
for (char in this@addKoreanLineBreaks) {
append(char)
if (char.code in 0xAC00..0xD7A3) append('​')
}
}

@Preview(showBackground = true, backgroundColor = 0xFF121212)
@Composable
private fun OnboardingContentItemSelectedPreview() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun ProfileKeywordSection(
)
if (isMyProfile && showInfoModal) {
InfoModalTrigger(
text = "저장한 작품들에서 반복되는 키워드를 분석해 취향 키워드를 만들어요. 10개 이상 작품이 쌓이면 업데이트할 수 있어요.",
text = "저장한 작품들에서 반복되는 키워드를 분석해 취향 키워드를 만들어요. 20개 이상 작품이 쌓이면 업데이트할 수 있어요.",
modifier = Modifier
.fillMaxWidth()
.offset(y = (-20).dp),
Expand Down
Loading