Skip to content

[Feature/#90] 홈 화면 리디자인 변경 사항을 반영합니다. #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
36f0952
Refactor: 루틴 엠티뷰 컴포넌트 리디자인 반영
wjdrjs00 Aug 10, 2025
3608ee4
Add: 기본 감정 그래픽 추가
wjdrjs00 Aug 10, 2025
083d519
Feat: 감정 등록 버튼 컴포넌트 구현
wjdrjs00 Aug 10, 2025
b4aea45
Feat: 홈 화면 헤더 리디자인 반영
wjdrjs00 Aug 10, 2025
799a424
Refactor: BitnagilFloatingButton 컴포넌트 리디자인 반영
wjdrjs00 Aug 10, 2025
934623b
Refactor: WeeklyDatePicker 컴포넌트 리디자인 반영
wjdrjs00 Aug 10, 2025
b573427
Refactor: 루틴, 서브루틴 컴포넌트 리디자인 반영
wjdrjs00 Aug 10, 2025
d1b2002
Chore: 툴팁 컴포넌트 제거
wjdrjs00 Aug 12, 2025
1d3563a
Refactor: 루틴 정렬 기능 제거
wjdrjs00 Aug 12, 2025
0c65dde
Refactor: RoutineSection 컴포넌트 리디자인 반영
wjdrjs00 Aug 12, 2025
190b37c
Refactor: 홈화면 리디자인 반영
wjdrjs00 Aug 12, 2025
987e909
Feat: 오늘의 감정 API v2 적용 및 UI 반영
wjdrjs00 Aug 12, 2025
d4e567b
Refactor: 루틴 수정, 삭제 로직 제거
wjdrjs00 Aug 13, 2025
02f7973
Chore: api url 수정
wjdrjs00 Aug 14, 2025
8edf0ee
Chore: 폰트 디자인 시스템 수정
wjdrjs00 Aug 14, 2025
5b57cc8
Refactor: 루틴 조회 api 버전업
wjdrjs00 Aug 14, 2025
e61f183
Refactor: 루틴 완료 api 버전 업
wjdrjs00 Aug 14, 2025
9ee1b7a
Chore: 불필요한 코드파일 삭제
wjdrjs00 Aug 14, 2025
e19aca6
Feat: 당일 모든 달성 시 완료 표시 기능 구현
wjdrjs00 Aug 14, 2025
97e319d
Chore: 코드래빗 리뷰사항 반영
wjdrjs00 Aug 15, 2025
86f33b9
Refactor: Routine LazyColumn 로직 변경
wjdrjs00 Aug 15, 2025
5c17495
Refactor: WeeklyDatePicker에서 derivedStateOf 제거
wjdrjs00 Aug 15, 2025
3581c05
Refactor: 감정구슬 이미지 로딩 개선
wjdrjs00 Aug 15, 2025
5d01e7a
Chore: ktlintFormat
wjdrjs00 Aug 15, 2025
2a655e9
Fix: 루틴 완료 로직 수정
wjdrjs00 Aug 15, 2025
17600db
Fix: 불필요한 Map 재생성 방지
wjdrjs00 Aug 15, 2025
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
3 changes: 0 additions & 3 deletions app/src/main/java/com/threegap/bitnagil/MainNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ fun MainNavHost(
navigateToRegisterRoutine = { routineId ->
navigator.navController.navigate(Route.WriteRoutine(routineId = routineId))
},
navigateToEditRoutine = { routineId ->
navigator.navController.navigate(Route.WriteRoutine(routineId = routineId, isRegister = false))
},
navigateToEmotion = {
navigator.navController.navigate(Route.Emotion)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ fun HomeNavHost(
navigateToNotice: () -> Unit,
navigateToQnA: () -> Unit,
navigateToRegisterRoutine: (String?) -> Unit,
navigateToEditRoutine: (String) -> Unit,
navigateToEmotion: () -> Unit,
) {
val navigator = rememberHomeNavigator()
Expand All @@ -66,7 +65,6 @@ fun HomeNavHost(
navigateToRegisterRoutine = {
navigateToRegisterRoutine(null)
},
navigateToEditRoutine = navigateToEditRoutine,
navigateToEmotion = navigateToEmotion,
)
}
Expand Down Expand Up @@ -102,11 +100,6 @@ fun HomeNavHost(

BitnagilFloatingActionMenu(
actions = listOf(
FloatingActionItem(
icon = R.drawable.ic_report,
text = "제보하기",
onClick = { GlobalBitnagilToast.showWarning("제보하기 기능은 추후 제공될 예정입니다.") },
),
FloatingActionItem(
icon = R.drawable.ic_routine_add,
text = "루틴 등록",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand All @@ -22,13 +21,12 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.scale
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.threegap.bitnagil.designsystem.BitnagilTheme
Expand All @@ -40,22 +38,22 @@ fun BitnagilFloatingButton(
@DrawableRes id: Int,
onClick: () -> Unit,
modifier: Modifier = Modifier,
isActive: Boolean = false,
colors: BitnagilFloatingButtonColor = BitnagilFloatingButtonColor.default(),
) {
Box(
contentAlignment = Alignment.Center,
modifier = modifier
.background(
color = BitnagilTheme.colors.navy500,
color = if (isActive) colors.activeIconBackgroundColor else colors.defaultIconBackgroundColor,
shape = CircleShape,
)
.size(52.dp)
.clickableWithoutRipple { onClick() },
) {
Image(
imageVector = ImageVector.vectorResource(id),
contentDescription = null,
colorFilter = ColorFilter.tint(BitnagilTheme.colors.white),
modifier = Modifier.size(24.dp),
BitnagilIcon(
id = id,
tint = if (isActive) colors.activeIconColor else colors.defaultIconColor,
)
}
}
Expand All @@ -66,8 +64,9 @@ fun BitnagilFloatingActionMenu(
isExpanded: Boolean,
onToggle: (Boolean) -> Unit,
modifier: Modifier = Modifier,
@DrawableRes defaultIcon: Int = R.drawable.ic_plus,
@DrawableRes defaultIcon: Int = R.drawable.ic_add,
@DrawableRes activeIcon: Int = R.drawable.ic_close,
colors: BitnagilFloatingButtonColor = BitnagilFloatingButtonColor.default(),
) {
Box(modifier = modifier) {
AnimatedVisibility(
Expand Down Expand Up @@ -102,7 +101,7 @@ fun BitnagilFloatingActionMenu(
),
) {
Column(
modifier = Modifier.padding(vertical = 16.dp, horizontal = 22.dp),
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(24.dp),
) {
actions.forEach { action ->
Expand All @@ -125,6 +124,8 @@ fun BitnagilFloatingActionMenu(
BitnagilFloatingButton(
id = if (isExpanded) activeIcon else defaultIcon,
onClick = { onToggle(!isExpanded) },
isActive = isExpanded,
colors = colors,
)
}
}
Expand All @@ -136,6 +137,24 @@ data class FloatingActionItem(
val onClick: () -> Unit,
)

@Immutable
data class BitnagilFloatingButtonColor(
val defaultIconColor: Color,
val defaultIconBackgroundColor: Color,
val activeIconColor: Color,
val activeIconBackgroundColor: Color,
) {
companion object {
@Composable
fun default() = BitnagilFloatingButtonColor(
defaultIconColor = BitnagilTheme.colors.white,
defaultIconBackgroundColor = BitnagilTheme.colors.orange500,
activeIconColor = BitnagilTheme.colors.coolGray30,
activeIconBackgroundColor = BitnagilTheme.colors.white,
)
}
}

@Composable
private fun FloatingActionMenuItem(
@DrawableRes icon: Int,
Expand All @@ -159,12 +178,13 @@ private fun FloatingActionMenuItem(
BitnagilIcon(
id = icon,
tint = null,
modifier = Modifier.size(24.dp),
)

Text(
text = text,
style = BitnagilTheme.typography.subtitle1Medium,
color = BitnagilTheme.colors.navy500,
style = BitnagilTheme.typography.body2Medium,
color = BitnagilTheme.colors.coolGray30,
)
}
}
Expand All @@ -174,17 +194,12 @@ private fun FloatingActionMenuItem(
private fun BitnagilFloatingButtonPreview() {
Column {
BitnagilFloatingButton(
id = R.drawable.ic_plus,
id = R.drawable.ic_add,
onClick = {},
)

BitnagilFloatingActionMenu(
actions = listOf(
FloatingActionItem(
icon = R.drawable.ic_report,
text = "제보하기",
onClick = {},
),
FloatingActionItem(
icon = R.drawable.ic_routine_add,
text = "루틴 등록",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
Expand Down Expand Up @@ -40,6 +41,7 @@ fun BitnagilTextButton(
shape: Shape = RoundedCornerShape(12.dp),
textStyle: TextStyle = BitnagilTheme.typography.body1SemiBold,
textDecoration: TextDecoration? = null,
textPadding: PaddingValues = PaddingValues(0.dp),
) {
val interactionSource = remember { MutableInteractionSource() }
val isPressed by interactionSource.collectIsPressedAsState()
Expand Down Expand Up @@ -77,6 +79,7 @@ fun BitnagilTextButton(
color = textColor,
style = textStyle,
textDecoration = textDecoration,
modifier = Modifier.padding(textPadding),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class BitnagilTypography internal constructor(
private val _cafe24SsurroundAir: BitnagilTextStyle = BitnagilTextStyle(
fontFamily = cafe24SsurroundAir,
fontWeight = FontWeight.Light,
fontSize = 24,
lineHeight = 36,
fontSize = 20,
lineHeight = 30,
letterSpacing = (-0.5f),
),
) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_add.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M18.551,12.266C18.088,12.266 18.088,11.884 17.613,11.884C17.139,11.884 17.15,11.757 16.676,11.757C16.201,11.757 16.213,12.023 15.75,12.023C15.287,12.023 15.287,11.942 14.812,11.942C14.338,11.942 14.349,12.081 13.875,12.081C13.4,12.081 13.4,12.116 12.937,12.116C12.474,12.116 12.463,12.069 12,12.069M12,12.069C11.537,12.069 11.537,11.884 11.062,11.884C10.588,11.884 10.599,11.757 10.125,11.757C9.65,11.757 9.662,12.023 9.199,12.023C8.736,12.023 8.736,11.942 8.261,11.942C7.787,11.942 7.798,12.081 7.324,12.081C6.849,12.081 6.849,12.116 6.386,12.116C5.923,12.116 5.912,12.069 5.449,12.069M12,12.069C12,11.607 12.115,11.537 12.115,11.063C12.115,10.588 12.243,10.6 12.243,10.125C12.243,9.651 11.976,9.662 11.976,9.199C11.976,8.736 12.058,8.736 12.058,8.262C12.058,7.787 11.919,7.799 11.919,7.324C11.919,6.85 11.884,6.85 11.884,6.387C11.884,5.924 11.93,5.912 11.93,5.449M12,12.069C12,12.533 11.884,12.463 11.884,12.938C11.884,13.412 11.757,13.401 11.757,13.875C11.757,14.35 12.023,14.338 12.023,14.801C12.023,15.264 11.942,15.264 11.942,15.738C11.942,16.213 12.081,16.201 12.081,16.676C12.081,17.151 12.115,17.151 12.115,17.614C12.115,18.076 12.069,18.088 12.069,18.551"
android:strokeWidth="2"
android:strokeColor="#ffffff"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>
13 changes: 0 additions & 13 deletions core/designsystem/src/main/res/drawable/ic_arrow_down_up.xml

This file was deleted.

30 changes: 14 additions & 16 deletions core/designsystem/src/main/res/drawable/ic_close.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:pathData="M8,7.999L16.001,16"
android:strokeWidth="1.7"
android:strokeColor="#AEB0B6"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M16,7.999L7.999,16"
android:strokeWidth="1.7"
android:strokeColor="#AEB0B6"
android:strokeLineCap="round" />
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<group>
<clip-path android:pathData="M3.38,3.363h13.24v13.274h-13.24z" />
<path
android:fillColor="#00000000"
android:pathData="M15.269,15.311C15.148,15.19 15.17,15.173 15.049,15.053C14.929,14.932 14.963,14.902 14.842,14.781C14.722,14.661 14.748,14.639 14.627,14.519C14.507,14.398 14.515,14.394 14.395,14.274C14.274,14.153 14.248,14.183 14.128,14.063C14.007,13.942 14.02,13.929 13.904,13.809C13.788,13.688 13.766,13.705 13.646,13.589C13.525,13.473 13.474,13.525 13.353,13.404C13.233,13.284 13.314,13.202 13.194,13.081C13.073,12.961 13.069,12.969 12.949,12.849C12.828,12.728 12.785,12.771 12.669,12.651C12.553,12.53 12.51,12.569 12.389,12.448C12.269,12.328 12.269,12.332 12.148,12.212C12.028,12.091 12.015,12.104 11.894,11.984C11.774,11.863 11.791,11.846 11.67,11.725C11.55,11.605 11.584,11.571 11.464,11.45C11.343,11.329 11.335,11.342 11.214,11.222C11.093,11.101 11.154,11.041 11.033,10.92C10.913,10.8 10.921,10.791 10.801,10.667C10.68,10.542 10.65,10.572 10.53,10.451C10.409,10.331 10.293,10.447 10.172,10.322C10.052,10.197 10.099,10.154 9.979,10.034M9.987,10.03C9.867,9.909 9.888,9.892 9.768,9.771C9.647,9.651 9.682,9.621 9.561,9.5C9.441,9.38 9.466,9.358 9.346,9.238C9.225,9.117 9.234,9.113 9.113,8.992C8.993,8.872 8.967,8.902 8.847,8.781C8.726,8.661 8.739,8.648 8.623,8.527C8.507,8.407 8.485,8.424 8.365,8.308C8.244,8.192 8.192,8.243 8.072,8.123C7.951,8.002 8.033,7.92 7.913,7.8C7.792,7.679 7.788,7.688 7.667,7.567C7.547,7.447 7.504,7.49 7.387,7.369C7.271,7.249 7.228,7.288 7.108,7.167C6.987,7.047 6.987,7.051 6.867,6.93C6.746,6.81 6.733,6.823 6.613,6.702C6.492,6.582 6.509,6.565 6.389,6.444C6.268,6.324 6.303,6.289 6.182,6.169C6.062,6.048 6.053,6.061 5.933,5.94C5.812,5.82 5.872,5.76 5.752,5.639C5.631,5.519 5.64,5.51 5.519,5.385C5.399,5.26 5.369,5.291 5.248,5.17C5.128,5.049 5.011,5.166 4.891,5.041C4.77,4.916 4.818,4.873 4.697,4.752M9.987,9.969C10.108,9.849 10.125,9.87 10.245,9.75C10.366,9.629 10.396,9.664 10.517,9.543C10.637,9.423 10.659,9.448 10.779,9.328C10.9,9.207 10.904,9.216 11.025,9.095C11.145,8.975 11.115,8.949 11.236,8.829C11.356,8.708 11.369,8.721 11.489,8.605C11.61,8.489 11.593,8.467 11.709,8.347C11.825,8.226 11.774,8.174 11.894,8.054C12.015,7.933 12.096,8.015 12.217,7.895C12.337,7.774 12.329,7.77 12.449,7.649C12.57,7.529 12.527,7.486 12.647,7.369C12.768,7.253 12.729,7.21 12.85,7.09C12.97,6.969 12.966,6.969 13.086,6.849C13.207,6.728 13.194,6.715 13.314,6.595C13.435,6.474 13.452,6.491 13.573,6.371C13.693,6.25 13.728,6.285 13.848,6.164C13.969,6.044 13.956,6.035 14.076,5.915C14.197,5.794 14.257,5.854 14.378,5.734C14.498,5.613 14.507,5.622 14.632,5.501C14.756,5.381 14.726,5.351 14.847,5.23C14.967,5.11 14.851,4.994 14.976,4.873C15.101,4.752 15.144,4.8 15.264,4.679M10.047,10.03C9.927,10.15 9.91,10.128 9.789,10.249C9.669,10.37 9.639,10.335 9.518,10.456C9.398,10.576 9.376,10.55 9.256,10.671C9.135,10.791 9.131,10.783 9.01,10.903C8.89,11.024 8.92,11.05 8.799,11.17C8.679,11.291 8.666,11.278 8.545,11.394C8.425,11.51 8.442,11.532 8.326,11.652C8.21,11.773 8.261,11.824 8.141,11.945C8.02,12.066 7.938,11.984 7.818,12.104C7.697,12.225 7.706,12.229 7.585,12.349C7.465,12.47 7.508,12.513 7.387,12.629C7.267,12.745 7.306,12.789 7.185,12.909C7.065,13.03 7.069,13.03 6.948,13.15C6.828,13.271 6.841,13.284 6.72,13.404C6.6,13.525 6.583,13.507 6.462,13.628C6.341,13.748 6.307,13.714 6.187,13.835C6.066,13.955 6.079,13.964 5.958,14.084C5.838,14.205 5.778,14.144 5.657,14.265C5.537,14.385 5.528,14.377 5.403,14.497C5.278,14.618 5.308,14.648 5.188,14.769C5.067,14.889 5.184,15.005 5.059,15.126C4.934,15.246 4.891,15.199 4.77,15.319"
android:strokeWidth="2.63853"
android:strokeColor="#46474C"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</group>
</vector>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.threegap.bitnagil.data.emotion.datasource

import com.threegap.bitnagil.data.emotion.model.dto.EmotionDto
import com.threegap.bitnagil.data.emotion.model.response.GetEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.RegisterEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.TodayEmotionResponseDto

interface EmotionDataSource {
suspend fun getEmotions(): Result<List<EmotionDto>>
suspend fun registerEmotion(emotion: String): Result<RegisterEmotionResponse>
suspend fun getEmotionMarble(currentDate: String): Result<GetEmotionResponse>
suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotionResponseDto>
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import com.threegap.bitnagil.data.common.safeApiCall
import com.threegap.bitnagil.data.emotion.datasource.EmotionDataSource
import com.threegap.bitnagil.data.emotion.model.dto.EmotionDto
import com.threegap.bitnagil.data.emotion.model.request.RegisterEmotionRequest
import com.threegap.bitnagil.data.emotion.model.response.GetEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.RegisterEmotionResponse
import com.threegap.bitnagil.data.emotion.model.response.TodayEmotionResponseDto
import com.threegap.bitnagil.data.emotion.service.EmotionService
import javax.inject.Inject

Expand All @@ -25,8 +25,8 @@ class EmotionDataSourceImpl @Inject constructor(
}
}

override suspend fun getEmotionMarble(currentDate: String): Result<GetEmotionResponse> =
override suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotionResponseDto> =
safeApiCall {
emotionService.getEmotionMarble(currentDate)
emotionService.fetchTodayEmotion(currentDate)
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
package com.threegap.bitnagil.data.emotion.model.response

import com.threegap.bitnagil.domain.emotion.model.Emotion
import com.threegap.bitnagil.domain.emotion.model.TodayEmotion
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class GetEmotionResponse(
data class TodayEmotionResponseDto(
@SerialName("emotionMarbleType")
val emotionMarbleType: String?,
@SerialName("emotionMarbleName")
val emotionMarbleName: String?,
@SerialName("imageUrl")
val imageUrl: String?,
@SerialName("emotionMarbleHomeMessage")
val emotionMarbleHomeMessage: String?,
)

fun GetEmotionResponse.toDomain(): Emotion? {
return if (emotionMarbleType != null && emotionMarbleName != null && imageUrl != null) {
Emotion(
emotionType = emotionMarbleType,
emotionMarbleName = emotionMarbleName,
fun TodayEmotionResponseDto.toDomain(): TodayEmotion? {
return if (emotionMarbleType != null && emotionMarbleName != null && imageUrl != null && emotionMarbleHomeMessage != null) {
TodayEmotion(
type = emotionMarbleType,
name = emotionMarbleName,
imageUrl = imageUrl,
homeMessage = emotionMarbleHomeMessage,
)
} else {
null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.threegap.bitnagil.data.emotion.model.response.toDomain
import com.threegap.bitnagil.domain.emotion.model.Emotion
import com.threegap.bitnagil.domain.emotion.model.EmotionChangeEvent
import com.threegap.bitnagil.domain.emotion.model.EmotionRecommendRoutine
import com.threegap.bitnagil.domain.emotion.model.TodayEmotion
import com.threegap.bitnagil.domain.emotion.repository.EmotionRepository
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
Expand Down Expand Up @@ -33,8 +34,8 @@ class EmotionRepositoryImpl @Inject constructor(
}
}

override suspend fun getEmotionMarble(currentDate: String): Result<Emotion?> =
emotionDataSource.getEmotionMarble(currentDate).map { it.toDomain() }
override suspend fun fetchTodayEmotion(currentDate: String): Result<TodayEmotion?> =
emotionDataSource.fetchTodayEmotion(currentDate).map { it.toDomain() }

private val _emotionChangeEventFlow = MutableSharedFlow<EmotionChangeEvent>()
override suspend fun getEmotionChangeEventFlow(): Flow<EmotionChangeEvent> = _emotionChangeEventFlow.asSharedFlow()
Expand Down
Loading