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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class HomeViewModel
}
}

private suspend fun fetchUserHomeData() {
private fun fetchUserHomeData() {
viewModelScope.launch {
runCatching {
val results = listOf(
Expand Down
12 changes: 8 additions & 4 deletions app/src/main/res/layout/activity_novel_rating.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,22 @@

<TextView
android:id="@+id/tv_novel_rating_title"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@{viewModel.uiState.novelRatingModel.novelTitle}"
android:textAlignment="center"
android:textAppearance="@style/title2"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_novel_rating_complete"
app:layout_constraintStart_toEndOf="@id/iv_novel_rating_navigate_back"
app:layout_constraintTop_toTopOf="parent"
tools:text="당신의 이해를 돕기 위하여" />
tools:text="당신의 이해를 돕기 위하여234234234234234234234243" />

<TextView
android:id="@+id/tv_novel_rating_complete"
android:layout_width="48dp"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
Expand Down
20 changes: 15 additions & 5 deletions app/src/main/res/values/typography.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,87 @@
<item name="fontFamily">@font/pretendard_bold</item>
<item name="android:textSize">20dp</item>
<item name="lineHeight">28dp</item>
<item name="android:letterSpacing">-0.06</item>
</style>

<style name="title1">
<item name="fontFamily">@font/pretendard_bold</item>
<item name="android:textSize">18dp</item>
<item name="lineHeight">25dp</item>
<item name="android:letterSpacing">-0.033</item>
</style>

<style name="title2">
<item name="fontFamily">@font/pretendard_semibold</item>
<item name="android:textSize">16dp</item>
<item name="lineHeight">22dp</item>
<item name="android:letterSpacing">-0.038</item>
</style>

<style name="title3">
<item name="fontFamily">@font/pretendard_medium</item>
<item name="android:textSize">14dp</item>
<item name="lineHeight">21dp</item>
<item name="lineHeight">14dp</item>
<item name="android:letterSpacing">-0.043</item>
</style>

<style name="body1">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">17dp</item>
<item name="lineHeight">24dp</item>
<item name="android:letterSpacing">-0.035</item>
</style>

<style name="body2">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">15dp</item>
<item name="lineHeight">22.5dp</item>
<item name="android:letterSpacing">-0.04</item>
</style>

<style name="body3">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">14dp</item>
<item name="lineHeight">21dp</item>
<item name="android:letterSpacing">-0.029</item>
</style>

<style name="body4">
<item name="fontFamily">@font/pretendard_medium</item>
<item name="android:textSize">13dp</item>
<item name="lineHeight">19dp</item>
<item name="android:letterSpacing">-0.031</item>
</style>

<style name="body4_2">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">13dp</item>
<item name="lineHeight">19dp</item>
<item name="android:letterSpacing">-0.031</item>
</style>

<style name="body5">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="android:textSize">12dp</item>
<item name="lineHeight">17dp</item>
<item name="lineHeight">17.4dp</item>
</style>

<style name="body5_2">
<item name="fontFamily">@font/pretendard_medium</item>
<item name="android:textSize">12dp</item>
<item name="lineHeight">17dp</item>
<item name="lineHeight">17.4dp</item>
</style>

<style name="label1">
<item name="fontFamily">@font/pretendard_medium</item>
<item name="android:textSize">13dp</item>
<item name="lineHeight">19dp</item>
<item name="android:letterSpacing">-0.031</item>
</style>

<style name="label2">
<item name="fontFamily">@font/pretendard_regular</item>
<item name="fontFamily">@font/pretendard_medium</item>
<item name="android:textSize">10dp</item>
<item name="lineHeight">10dp</item>
</style>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.ui.text.font.FontWeight.Companion.SemiBold
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.em
import com.into.websoso.core.resource.R.font.pretendard_bold
import com.into.websoso.core.resource.R.font.pretendard_medium
import com.into.websoso.core.resource.R.font.pretendard_regular
Expand All @@ -34,31 +35,35 @@ data class WebsosoTypography(
)

internal fun WebsosoTypography(density: Density): WebsosoTypography {
val textStyle =
{ fontFamily: FontFamily, fontWeight: FontWeight, fontSizeDp: Dp, lineHeightDp: Dp ->
TextStyle(
fontFamily = fontFamily,
fontWeight = fontWeight,
fontSize = with(density) { fontSizeDp.toSp() },
lineHeight = with(density) { lineHeightDp.toSp() },
)
}
fun textStyle(
fontFamily: FontFamily,
fontWeight: FontWeight,
fontSizeDp: Dp,
lineHeightDp: Dp,
letterSpacingEm: Float = 0f,
) = TextStyle(
fontFamily = fontFamily,
fontWeight = fontWeight,
fontSize = with(density) { fontSizeDp.toSp() },
lineHeight = with(density) { lineHeightDp.toSp() },
letterSpacing = letterSpacingEm.em,
)

return WebsosoTypography(
headline1 = textStyle(PretendardBold, Bold, 20.dp, 28.dp),
title1 = textStyle(PretendardBold, Bold, 18.dp, 25.dp),
title2 = textStyle(PretendardSemiBold, SemiBold, 16.dp, 22.dp),
title3 = textStyle(PretendardMedium, Medium, 14.dp, 14.dp),
headline1 = textStyle(PretendardBold, Bold, 20.dp, 28.dp, -0.06f),
title1 = textStyle(PretendardBold, Bold, 18.dp, 25.dp, -0.033f),
title2 = textStyle(PretendardSemiBold, SemiBold, 16.dp, 22.dp, -0.038f),
title3 = textStyle(PretendardMedium, Medium, 14.dp, 14.dp, -0.043f),
title4 = textStyle(PretendardBold, Bold, 13.dp, 23.dp),
body1 = textStyle(PretendardRegular, Normal, 17.dp, 24.dp),
body2 = textStyle(PretendardRegular, Normal, 15.dp, 23.dp),
body3 = textStyle(PretendardRegular, Normal, 14.dp, 21.dp),
body4 = textStyle(PretendardMedium, Medium, 13.dp, 19.dp),
body5 = textStyle(PretendardRegular, Normal, 12.dp, 17.dp),
body4Secondary = textStyle(PretendardRegular, Normal, 13.dp, 19.dp),
body5Secondary = textStyle(PretendardMedium, Medium, 12.dp, 17.dp),
label1 = textStyle(PretendardMedium, Medium, 13.dp, 19.dp),
label2 = textStyle(PretendardRegular, Normal, 10.dp, 10.dp),
body1 = textStyle(PretendardRegular, Normal, 17.dp, 24.dp, -0.035f),
body2 = textStyle(PretendardRegular, Normal, 15.dp, 22.5.dp, -0.04f),
body3 = textStyle(PretendardRegular, Normal, 14.dp, 21.dp, -0.029f),
body4 = textStyle(PretendardMedium, Medium, 13.dp, 19.dp, -0.031f),
body5 = textStyle(PretendardRegular, Normal, 12.dp, 17.4.dp),
body4Secondary = textStyle(PretendardRegular, Normal, 13.dp, 19.dp, -0.031f),
body5Secondary = textStyle(PretendardMedium, Medium, 12.dp, 17.4.dp),
label1 = textStyle(PretendardMedium, Medium, 13.dp, 19.dp, -0.031f),
label2 = textStyle(PretendardMedium, Medium, 10.dp, 10.dp),
)
}

Expand Down
2 changes: 1 addition & 1 deletion core/resource/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<string name="novel_info_view_more">…더보기</string>
<string name="novel_info_view_less">접기</string>
<string name="novel_info_title">작품 소개</string>
<string name="novel_info_rating_title">독자들의 평가</string>
<string name="novel_info_rating_title">독자들의 감상평</string>
<string name="novel_info_keyword_chip_text">%s %d</string>
<string name="novel_info_review_none">아직 평가가 없어요\n최초로 남겨보세요!</string>
<string name="novel_info_read_status_watching">보는 중</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.into.websoso.feature.feed.component

import androidx.annotation.DrawableRes
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand All @@ -19,7 +20,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand All @@ -28,9 +28,11 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.into.websoso.core.common.extensions.debouncedClickable
Expand Down Expand Up @@ -66,8 +68,7 @@ internal fun MyFeedFilterModal(
topStart = 16.dp,
topEnd = 16.dp,
),
)
.navigationBarsPadding(),
).navigationBarsPadding(),
) {
Row(
horizontalArrangement = Arrangement.SpaceBetween,
Expand Down Expand Up @@ -152,8 +153,7 @@ internal fun MyFeedFilterModal(
.background(
color = Primary100,
shape = RoundedCornerShape(size = 14.dp),
)
.debouncedClickable {
).debouncedClickable {
onApplyFilterClick(MyFeedFilter(tempGenres, tempIsVisible, tempIsUnVisible))
},
) {
Expand Down Expand Up @@ -190,11 +190,11 @@ private fun VisibilityRow(
imageVector = ImageVector.vectorResource(id = iconRes),
contentDescription = null,
modifier = Modifier.size(size = 18.dp),
tint = if (isSelected) Black else Gray200,
tint = Gray200,
)
Text(
text = text,
color = if (isSelected) Black else Gray200,
color = Gray200,
style = WebsosoTheme.typography.body2,
)
}
Expand All @@ -217,8 +217,8 @@ private fun GenreChipGroup(
) {
FlowRow(
modifier = modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(space = 6.dp),
verticalArrangement = Arrangement.spacedBy(space = 14.dp),
horizontalArrangement = Arrangement.spacedBy(space = 4.dp),
verticalArrangement = Arrangement.spacedBy(space = 8.dp),
) {
NovelCategory.entries.forEach { category ->
val isSelected = selectedCategories.contains(category)
Expand All @@ -244,16 +244,23 @@ private fun GenreChip(
text: String,
isSelected: Boolean,
onChipClick: () -> Unit,
modifier: Modifier = Modifier,
) {
Surface(
shape = RoundedCornerShape(size = 20.dp),
border = BorderStroke(width = 1.dp, color = if (isSelected) Primary100 else Gray50),
color = if (isSelected) Primary50 else Gray50,
onClick = onChipClick,
Box(
modifier = modifier
.clip(RoundedCornerShape(size = 20.dp))
.border(
width = 1.dp,
color = if (isSelected) Primary100 else Gray50,
shape = RoundedCornerShape(size = 20.dp),
).background(color = if (isSelected) Primary50 else Gray50)
.clickable(onClick = onChipClick),
contentAlignment = Alignment.Center,
) {
Text(
text = text,
modifier = Modifier.padding(horizontal = 10.dp, vertical = 8.dp),
modifier = Modifier.padding(horizontal = 12.dp, vertical = 8.dp),
textAlign = TextAlign.Center,
color = if (isSelected) Primary100 else Gray300,
style = WebsosoTheme.typography.body2,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ enum class NovelCategory(
val tag: String,
val koreanName: String,
) {
ROMANCE(LightPink, Pink, "romance", "로맨스"),
ROMANCE_FANTASY(LightRed, Red, "romanceFantasy", "로판"),
FANTASY(LightPurple, Purple, "fantasy", "판타지"),
MODERN_FANTASY(LightBlue, Blue, "modernFantasy", "현판"),
ROMANCE(LightPink, Pink, "romance", "로맨스"),
ROMANCE_FANTASY(LightRed, Red, "romanceFantasy", "로판"),
WUXIA(LightOrange, Orange, "wuxia", "무협"),
MYSTERY(LightViolet, Violet, "mystery", "미스테리"),
MYSTERY(LightViolet, Violet, "mystery", "미스터리"),
DRAMA(LightGray, Gray, "drama", "드라마"),
LIGHT_NOVEL(LightGreen, Green, "lightNovel", "라노벨"),
BOYS_LOVE(LightMint, Mint, "BL", "BL"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,47 +38,47 @@ internal fun LibraryFilterBottomSheetAttractivePoints(
icon = ic_library_world_view,
iconTitle = "세계관",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[WORLDVIEW],
onClick = { onAttractivePointClick(WORLDVIEW) },
)
LibraryFilterBottomSheetClickableItem(
icon = ic_library_material,
iconTitle = "소재",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[MATERIAL],
onClick = { onAttractivePointClick(MATERIAL) },
)
LibraryFilterBottomSheetClickableItem(
icon = ic_library_writingskill,
iconTitle = "필력",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[WRITINGSKILL],
onClick = { onAttractivePointClick(WRITINGSKILL) },
)
LibraryFilterBottomSheetClickableItem(
icon = ic_library_character,
iconTitle = "캐릭터",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[CHARACTER],
onClick = { onAttractivePointClick(CHARACTER) },
)
LibraryFilterBottomSheetClickableItem(
icon = ic_library_relationship,
iconTitle = "관계",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[RELATIONSHIP],
onClick = { onAttractivePointClick(RELATIONSHIP) },
)
LibraryFilterBottomSheetClickableItem(
icon = ic_library_vibe,
iconTitle = "분위기",
horizontalPadding = 12.dp,
iconSize = 36.dp,
iconSize = 32.dp,
isSelected = attractivePoints[VIBE],
onClick = { onAttractivePointClick(VIBE) },
)
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
# App Versioning
versionCode = "10049"
versionName = "1.6.2"
versionCode = "10050"
versionName = "1.6.3"

# Gradle Plugin & Kotlin
android-gradle-plugin = "8.13.2"
Expand Down
Loading