diff --git a/app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt b/app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt index dae52d0198..fa987029b6 100644 --- a/app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt +++ b/app/src/androidTest/java/com/afternote/afternote_fe/AppAndReceiverCompletionAndroidTest.kt @@ -40,7 +40,6 @@ import com.afternote.core.common.reporting.ErrorReporter import com.afternote.core.domain.error.CoreAuthFailure import com.afternote.core.domain.repository.UserProfileRepository import com.afternote.core.domain.repository.auth.AuthRepository -import com.afternote.core.model.MindRecordCategory import com.afternote.core.model.Session import com.afternote.core.ui.Route import com.afternote.core.ui.theme.AfternoteTheme @@ -49,6 +48,7 @@ import com.afternote.feature.afternote.domain.model.LeaveMessageBlock import com.afternote.feature.home.presentation.HomeTabActions import com.afternote.feature.mindrecord.domain.model.ReceiverMindRecords import com.afternote.feature.mindrecord.domain.repository.MindRecordReceiverRepository +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import com.afternote.feature.receiver.domain.error.ReceiverFailure import com.afternote.feature.receiver.domain.model.AfterNoteListItem import com.afternote.feature.receiver.domain.model.AfterNotesListResult diff --git a/app/src/main/java/com/afternote/afternote_fe/navigation/AppNavigationActions.kt b/app/src/main/java/com/afternote/afternote_fe/navigation/AppNavigationActions.kt index 2b706fe469..9dc8e04c7a 100644 --- a/app/src/main/java/com/afternote/afternote_fe/navigation/AppNavigationActions.kt +++ b/app/src/main/java/com/afternote/afternote_fe/navigation/AppNavigationActions.kt @@ -5,13 +5,13 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.runtime.rememberUpdatedState import androidx.navigation.NavController -import com.afternote.core.model.MindRecordCategory import com.afternote.core.ui.Route import com.afternote.core.ui.bottombar.BottomNavTab import com.afternote.feature.afternote.presentation.author.editor.model.EditorCategory import com.afternote.feature.afternote.presentation.author.navigation.AfternoteNavActions import com.afternote.feature.afternote.presentation.author.navigation.model.AfternoteRoute import com.afternote.feature.home.presentation.HomeTabActions +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import com.afternote.feature.mindrecord.presentation.navigation.MindRecordNavActions import com.afternote.feature.mindrecord.presentation.navigation.MindRecordRoute import com.afternote.feature.onboarding.presentation.navigation.OnboardingNavActions diff --git a/core/model/src/main/kotlin/com/afternote/core/model/MindRecordCategory.kt b/core/model/src/main/kotlin/com/afternote/core/model/MindRecordCategory.kt deleted file mode 100644 index 15d271ea00..0000000000 --- a/core/model/src/main/kotlin/com/afternote/core/model/MindRecordCategory.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.afternote.core.model - -/** - * 마음의 기록 카테고리. - * - * UI 리소스(아이콘·표시 문자열)는 피처 모듈에서 확장 프로퍼티로 제공한다. - */ -enum class MindRecordCategory { - DAILY_QUESTION, - DIARY, - WEEKLY_REPORT, -} diff --git a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabScreen.kt b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabScreen.kt index 724d8ee4be..bcfdf9a1d1 100644 --- a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabScreen.kt +++ b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabScreen.kt @@ -23,7 +23,6 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.afternote.core.model.MindRecordCategory import com.afternote.core.ui.AfternoteOutlinedCard import com.afternote.core.ui.AfternoteSectionHeader import com.afternote.core.ui.badge.RecipientDesignationBadge @@ -34,6 +33,7 @@ import com.afternote.core.ui.theme.AfternoteTheme import com.afternote.core.ui.topbar.HomeTopBar import com.afternote.feature.mindrecord.presentation.hometab.homeTabMindRecordMemoriesSection import com.afternote.feature.mindrecord.presentation.hometab.homeTabMindRecordQuestionAndCategories +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import java.time.LocalDate import java.time.format.DateTimeFormatter diff --git a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabViewModel.kt b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabViewModel.kt index 6006d172f4..65d9761e85 100644 --- a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabViewModel.kt +++ b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/HomeTabViewModel.kt @@ -5,11 +5,11 @@ import androidx.lifecycle.viewModelScope import com.afternote.core.common.reporting.ErrorReporter import com.afternote.core.common.result.runCatchingCancellable import com.afternote.core.domain.repository.UserProfileRepository -import com.afternote.core.model.HomeSummary -import com.afternote.core.model.MindRecordCategory import com.afternote.feature.home.presentation.reporting.HomeFailureStage import com.afternote.feature.home.presentation.reporting.recordHomeFailure import com.afternote.feature.home.presentation.usecase.GetHomeSummaryUseCase +import com.afternote.feature.home.presentation.usecase.HomeSummary +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Job import kotlinx.coroutines.flow.MutableStateFlow diff --git a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/GetHomeSummaryUseCase.kt b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/GetHomeSummaryUseCase.kt index f5951d4712..2e4ac15a3b 100644 --- a/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/GetHomeSummaryUseCase.kt +++ b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/GetHomeSummaryUseCase.kt @@ -2,7 +2,7 @@ package com.afternote.feature.home.presentation.usecase import com.afternote.core.common.result.runCatchingCancellable import com.afternote.core.domain.repository.UserRepository -import com.afternote.core.model.HomeSummary +import com.afternote.feature.home.presentation.usecase.HomeSummary import com.afternote.feature.mindrecord.domain.repository.DailyQuestionRepository import com.afternote.feature.mindrecord.domain.repository.DiaryRepository import kotlinx.coroutines.async diff --git a/core/model/src/main/kotlin/com/afternote/core/model/HomeSummary.kt b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/HomeSummary.kt similarity index 88% rename from core/model/src/main/kotlin/com/afternote/core/model/HomeSummary.kt rename to feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/HomeSummary.kt index 690beb50ff..3e43634039 100644 --- a/core/model/src/main/kotlin/com/afternote/core/model/HomeSummary.kt +++ b/feature/home/presentation/src/main/kotlin/com/afternote/feature/home/presentation/usecase/HomeSummary.kt @@ -1,4 +1,4 @@ -package com.afternote.core.model +package com.afternote.feature.home.presentation.usecase data class HomeSummary( val userName: String, diff --git a/feature/home/presentation/src/screenshotTest/kotlin/com/afternote/feature/home/presentation/HomeTabScreenScreenshotTest.kt b/feature/home/presentation/src/screenshotTest/kotlin/com/afternote/feature/home/presentation/HomeTabScreenScreenshotTest.kt index 51c269caf4..928cb7accf 100644 --- a/feature/home/presentation/src/screenshotTest/kotlin/com/afternote/feature/home/presentation/HomeTabScreenScreenshotTest.kt +++ b/feature/home/presentation/src/screenshotTest/kotlin/com/afternote/feature/home/presentation/HomeTabScreenScreenshotTest.kt @@ -2,8 +2,8 @@ package com.afternote.feature.home.presentation import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview -import com.afternote.core.model.MindRecordCategory import com.afternote.core.ui.theme.AfternoteTheme +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import com.android.tools.screenshot.PreviewTest /** diff --git a/feature/home/presentation/src/test/kotlin/com/afternote/feature/home/presentation/HomeTabViewModelTest.kt b/feature/home/presentation/src/test/kotlin/com/afternote/feature/home/presentation/HomeTabViewModelTest.kt index 2bcc8919b3..609c30d111 100644 --- a/feature/home/presentation/src/test/kotlin/com/afternote/feature/home/presentation/HomeTabViewModelTest.kt +++ b/feature/home/presentation/src/test/kotlin/com/afternote/feature/home/presentation/HomeTabViewModelTest.kt @@ -3,7 +3,6 @@ package com.afternote.feature.home.presentation import com.afternote.core.common.reporting.ErrorReporter import com.afternote.core.domain.repository.UserProfileRepository import com.afternote.core.domain.repository.UserRepository -import com.afternote.core.model.MindRecordCategory import com.afternote.core.model.delivery.DeliveryConditionItem import com.afternote.core.model.delivery.ReceiverDeliveryConditions import com.afternote.core.model.user.Receiver @@ -22,6 +21,7 @@ import com.afternote.feature.mindrecord.domain.model.DiaryUpdatePayload import com.afternote.feature.mindrecord.domain.model.TodayDailyQuestion import com.afternote.feature.mindrecord.domain.repository.DailyQuestionRepository import com.afternote.feature.mindrecord.domain.repository.DiaryRepository +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/hometab/HomeTabMindRecordLazyItems.kt b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/hometab/HomeTabMindRecordLazyItems.kt index 69bdc3e888..61dc2da819 100644 --- a/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/hometab/HomeTabMindRecordLazyItems.kt +++ b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/hometab/HomeTabMindRecordLazyItems.kt @@ -22,7 +22,6 @@ import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel import androidx.lifecycle.Lifecycle import androidx.lifecycle.compose.LifecycleEventEffect import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.afternote.core.model.MindRecordCategory import com.afternote.core.ui.AfternoteSectionHeader import com.afternote.core.ui.theme.AfternoteTheme import com.afternote.feature.mindrecord.presentation.R.string.mindrecord_home_tab_memories_section_click_label @@ -30,6 +29,7 @@ import com.afternote.feature.mindrecord.presentation.R.string.mindrecord_home_ta import com.afternote.feature.mindrecord.presentation.component.MemoriesCard import com.afternote.feature.mindrecord.presentation.component.TodayQuestionCard import com.afternote.feature.mindrecord.presentation.component.hometab.RecordCategoryCard +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import com.afternote.feature.mindrecord.presentation.model.MindRecordCategoryUi import com.afternote.feature.mindrecord.presentation.util.htmlToPlainText import com.afternote.feature.mindrecord.presentation.viewmodel.MemoriesCardViewModel diff --git a/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategory.kt b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategory.kt new file mode 100644 index 0000000000..b9b36c09b2 --- /dev/null +++ b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategory.kt @@ -0,0 +1,15 @@ +package com.afternote.feature.mindrecord.presentation.model + +/** + * 마음의 기록 카테고리. + * + * 표시용 아이콘·문구는 같은 패키지의 [MindRecordCategoryUi] 가 들고 있다. + * + * 이 타입을 아는 모듈은 홈·마음의 기록·app 셋뿐이라 core:model(11개 모듈이 의존)에 두지 + * 않는다. 셋 다 이미 이 모듈에 의존하고 있어 새 모듈 의존이 생기지 않는다 (#1085). + */ +enum class MindRecordCategory { + DAILY_QUESTION, + DIARY, + WEEKLY_REPORT, +} diff --git a/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategoryUi.kt b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategoryUi.kt index b23dc31929..66aa9287b1 100644 --- a/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategoryUi.kt +++ b/feature/mindrecord/presentation/src/main/kotlin/com/afternote/feature/mindrecord/presentation/model/MindRecordCategoryUi.kt @@ -12,8 +12,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import com.afternote.core.model.MindRecordCategory import com.afternote.feature.mindrecord.presentation.R +import com.afternote.feature.mindrecord.presentation.model.MindRecordCategory import com.afternote.core.ui.R as CoreUiR sealed class MindRecordCategoryUi(