-
Notifications
You must be signed in to change notification settings - Fork 0
π(::62) Notice μλ²ν΅μ μ μν μΈν μ νμ΅λλ€ #63
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
Conversation
Walkthroughμ΄λ² PRμ 곡μ§μ¬ν κΈ°λ₯μ μ λ©΄ λμ
ν©λλ€. μμ‘΄μ± μ£Όμ
λͺ¨λμ Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NoticeScreen
participant HomesViewModel
participant GetNoticeUseCase
participant NoticeRepository
participant NoticeDatasource
participant NoticeAPI
User->>NoticeScreen: 곡μ§μ¬ν μμ² (noticeId μ λ¬)
NoticeScreen->>HomesViewModel: getNotice(noticeId) νΈμΆ
HomesViewModel->>GetNoticeUseCase: Invoke(noticeId)
GetNoticeUseCase->>NoticeRepository: getNotice(noticeId) νΈμΆ
NoticeRepository->>NoticeDatasource: getNotice(noticeId) νΈμΆ
NoticeDatasource->>NoticeAPI: getNotice(noticeId) νΈμΆ
NoticeAPI-->>NoticeDatasource: NoticeResponse 리μ€νΈ λ°ν
NoticeDatasource-->>NoticeRepository: Flow<List<NoticeResponseModel>> λ°ν
NoticeRepository-->>GetNoticeUseCase: Flow<List<NoticeResponseModel>> μ λ¬
GetNoticeUseCase-->>HomesViewModel: Flow<List<NoticeResponseModel>> μ λ¬
HomesViewModel-->>NoticeScreen: NoticeUiState μ
λ°μ΄νΈ (Success/Fail)
NoticeScreen->>User: UIμ 곡μ§μ¬ν λ λλ§
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (3)
π§ Files skipped from review as they are similar to previous changes (3)
β° Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
π Outside diff range comments (1)
app/src/main/java/module/NetworkModule.kt (1)
73-73: π οΈ Refactor suggestionνλμ½λ©λ baseUrlμ μ€μ νμΌλ‘ μ΄λνμΈμ.
"exple Base url"κ³Ό κ°μ νλμ½λ©λ κ°μ μ μ§λ³΄μμ νκ²½ μ€μ λ³κ²½μ μ΄λ ΅κ² λ§λλλ€. BuildConfigλ μ€μ νμΌλ‘ μ΄λνλ κ²μ΄ μ’μ΅λλ€.
- .baseUrl("exple Base url") + .baseUrl(BuildConfig.BASE_URL)
π§Ή Nitpick comments (9)
domain/src/main/java/model/users/response/NoticeResponseModel.kt (1)
3-8: λ¬Έμν μΆκ° μ μλ°μ΄ν° ν΄λμ€μ λͺ©μ κ³Ό κ° νλμ μν μ λͺ νν νκΈ° μν΄ KDoc λ¬Έμνλ₯Ό μΆκ°νλ κ²μ΄ μ’κ² μ΅λλ€.
+/** + * 곡μ§μ¬ν μλ΅μ μν λλ©μΈ λͺ¨λΈ + * + * @property noticeId 곡μ§μ¬ν κ³ μ μλ³μ + * @property title 곡μ§μ¬ν μ λͺ© + * @property content 곡μ§μ¬ν λ΄μ© + * @property name μμ±μ μ΄λ¦ + */ data class NoticeResponseModel ( val noticeId: Int, val title: String, val content: String, val name: String, )data/src/main/java/remote/datasource/notice/NoticeDatasource.kt (1)
7-9: μΈν°νμ΄μ€ λ¬Έμν μΆκ° μ μμΈν°νμ΄μ€μ λ©μλμ μν μ λͺ νν νκΈ° μν΄ KDoc λ¬Έμνλ₯Ό μΆκ°νλ κ²μ΄ μ’κ² μ΅λλ€.
+/** + * 곡μ§μ¬ν λ°μ΄ν° μμ€ μΈν°νμ΄μ€ + */ interface NoticeDatasource { + /** + * νΉμ 곡μ§μ¬ν IDμ ν΄λΉνλ 곡μ§μ¬ν λͺ©λ‘μ μ‘°νν©λλ€. + * + * @param noticeId μ‘°νν 곡μ§μ¬ν ID + * @return 곡μ§μ¬ν μλ΅ λͺ©λ‘μ ν¬ν¨νλ Flow + */ fun getNotice(noticeId: UUID): Flow<List<NoticeResponse>> }domain/src/main/java/usecase/notice/GetNoticeUseCase.kt (1)
4-4: μ¬μ©νμ§ μλ import λ¬Έμ μ κ±°ν΄μ£ΌμΈμ.
RankResponseModelμ νμ¬ μ½λμμ μ¬μ©λμ§ μκ³ μμ΅λλ€.-import model.rank.response.RankResponseModeldata/src/main/java/remote/datasource/notice/NoticeDataSourceImpl.kt (1)
14-16: μλ¬ μ²λ¦¬μ λν λ¬Έμνκ° νμν©λλ€.
performApiRequestμ νΈλ¦¬ν°λ₯Ό μ¬μ©ν ꡬνμ μ’μ΅λλ€. νμ§λ§ λ°μ κ°λ₯ν μμΈ μν©κ³Ό μ²λ¦¬ λ°©λ²μ λν λ¬Έμνλ₯Ό μΆκ°νλ©΄ μ’μ κ² κ°μ΅λλ€.λ€μκ³Ό κ°μ΄ KDocμ μΆκ°ν΄μ£ΌμΈμ:
+ /** + * 곡μ§μ¬νμ μ‘°νν©λλ€. + * @param noticeId μ‘°νν 곡μ§μ¬νμ ID + * @return 곡μ§μ¬ν λͺ©λ‘ + * @throws IOException λ€νΈμν¬ μ€λ₯ λ°μ μ + * @throws HttpException API νΈμΆ μ€ν¨ μ + */ override fun getNotice(noticeId: UUID): Flow<List<NoticeResponse>> =data/src/main/java/repoistory/NoticeRepositoryImpl.kt (1)
16-18: κ°λ μ± ν₯μμ μν μ½λ ν¬λ§·ν μ΄ νμν©λλ€.map μ°μ°μ 체μΈμ΄ ν μ€μ μμ΄ κ°λ μ±μ΄ λ¨μ΄μ§λλ€. μ¬λ¬ μ€λ‘ λλμ΄ μμ±νλ κ²μ΄ μ’κ² μ΅λλ€.
λ€μκ³Ό κ°μ΄ κ°μ ν΄λ³΄μΈμ:
- override fun getNotice(noticeId: UUID): Flow<List<NoticeResponseModel>> { - return noticeDatasource.getNotice(noticeId = noticeId).map {list -> list.map { it.toModel() } } - } + override fun getNotice(noticeId: UUID): Flow<List<NoticeResponseModel>> { + return noticeDatasource.getNotice(noticeId = noticeId) + .map { list -> + list.map { it.toModel() } + } + }app/src/main/java/module/RemoteDataSourceModule.kt (1)
31-34: μ½λ μ€νμΌ κ°μ μ΄ νμν©λλ€.λ°ν νμ μ μΈ λΆλΆμ μ½λ‘ μμ κ³΅λ°±μ΄ λλ½λμ΄ μμ΅λλ€.
λ€μκ³Ό κ°μ΄ μμ ν΄μ£ΌμΈμ:
- ):NoticeDatasource + ): NoticeDatasourcepresentation/src/main/java/view/notice/component/NoticeCard.kt (1)
96-102: μ λͺ©μλ ν μ€νΈ μ€λ²νλ‘μ° μ²λ¦¬λ₯Ό μΆκ°νμΈμ.κΈ΄ μ λͺ©μ΄ UIλ₯Ό λ²μ΄λλ κ²μ λ°©μ§νκΈ° μν΄ μ λͺ© ν μ€νΈμλ μ€λ²νλ‘μ° μ²λ¦¬κ° νμν©λλ€.
Text( text = data.title, color = colors.WHITE, fontFamily = typography.bodySmall.fontFamily, fontWeight = FontWeight.Bold, - fontSize = 14.sp + fontSize = 14.sp, + maxLines = 1, + overflow = TextOverflow.Ellipsis )presentation/src/main/java/view/notice/screen/NoticeScreen.kt (2)
73-73: νλμ½λ©λ μμ κ°μ ν λ§λ‘ μ΄λνμΈμ.Color(0xFF1E1E1E)μ κ°μ νλμ½λ©λ μμ κ°μ ν λ§ μμ€ν μ ν΅ν΄ κ΄λ¦¬λμ΄μΌ ν©λλ€.
- .background(color = Color(0xFF1E1E1E)) + .background(color = colors.background)
109-118: 미리보기μ λ λ€μν μνλ₯Ό μΆκ°νμΈμ.νμ¬λ Loading μνλ§ λ―Έλ¦¬λ³΄κΈ°ν μ μμ΅λλ€. Success, Empty, Fail μνλ 미리보기μ μΆκ°νλ©΄ μ’κ² μ΅λλ€.
@Preview @Composable fun NoticeScreenPreview() { + Column { + // Loading μν + NoticeScreen( + noticeUiState = NoticeUiState.Loading, + onErrorToast = { _, _ -> }, + navigateToBack = {}, + noticeCallBack = {}, + ) + + // Success μν + NoticeScreen( + noticeUiState = NoticeUiState.Success( + listOf( + NoticeResponseModel( + noticeId = UUID.randomUUID(), + title = "ν μ€νΈ 곡μ§μ¬ν", + content = "ν μ€νΈ λ΄μ©μ λλ€." + ) + ) + ), + onErrorToast = { _, _ -> }, + navigateToBack = {}, + noticeCallBack = {}, + ) + } }
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (16)
app/src/main/java/module/NetworkModule.kt(2 hunks)app/src/main/java/module/RemoteDataSourceModule.kt(2 hunks)app/src/main/java/module/RepositoryModule.kt(2 hunks)data/src/main/java/remote/api/auth/NoticeAPI.kt(1 hunks)data/src/main/java/remote/datasource/notice/NoticeDataSourceImpl.kt(1 hunks)data/src/main/java/remote/datasource/notice/NoticeDatasource.kt(1 hunks)data/src/main/java/remote/dto/users/response/NoticeResponse.kt(1 hunks)data/src/main/java/repoistory/NoticeRepositoryImpl.kt(1 hunks)domain/src/main/java/model/users/response/NoticeResponseModel.kt(1 hunks)domain/src/main/java/reopoistory/NoticeRepository.kt(1 hunks)domain/src/main/java/usecase/notice/GetNoticeUseCase.kt(1 hunks)presentation/src/main/java/view/notice/component/NoticeCard.kt(1 hunks)presentation/src/main/java/view/notice/navgation/NoticeNavigation.kt(1 hunks)presentation/src/main/java/view/notice/screen/NoticeScreen.kt(1 hunks)presentation/src/main/java/viewModel/homes/HomesViewmodel.kt(1 hunks)presentation/src/main/java/viewModel/homes/uistate/NoticeUiState.kt(1 hunks)
π Additional comments (7)
presentation/src/main/java/viewModel/homes/uistate/NoticeUiState.kt (1)
6-11: UI μν κ΄λ¦¬κ° μ ꡬνλμ΄ μμ΅λλ€!sealed interfaceλ₯Ό μ¬μ©νμ¬ κ³΅μ§μ¬νμ μνλ₯Ό λͺ ννκ² μ μνμ΅λλ€. Loading, Empty, Success, Fail μνλ₯Ό ν΅ν΄ UIμ λ€μν μν©μ μ μ²λ¦¬ν μ μμ΅λλ€.
domain/src/main/java/usecase/notice/GetNoticeUseCase.kt (1)
10-16: UseCase ꡬνμ΄ κΉλν©λλ€!μμ‘΄μ± μ£Όμ κ³Ό Flowλ₯Ό νμ©ν ꡬνμ΄ μ λμ΄μμ΅λλ€. operator fun invokeλ₯Ό μ¬μ©νμ¬ UseCaseμ νΈμΆμ κ°λ¨νκ² λ§λ μ μ΄ μ’μ΅λλ€.
data/src/main/java/remote/dto/users/response/NoticeResponse.kt (1)
15-20: λͺ¨λΈ λ³ν ꡬνμ΄ κΉλν©λλ€!νμ₯ ν¨μλ₯Ό μ¬μ©νμ¬ DTOλ₯Ό λλ©μΈ λͺ¨λΈλ‘ λ³ννλ ꡬνμ΄ μ λμ΄μμ΅λλ€.
presentation/src/main/java/view/notice/navgation/NoticeNavigation.kt (1)
1-24: λ€λΉκ²μ΄μ ꡬνμ΄ μ λμ΄μμ΅λλ€!λ€λΉκ²μ΄μ λ‘μ§μ΄ κΉλνκ² κ΅¬νλμ΄ μμΌλ©°, μλ¬ μ²λ¦¬μ λ€λ‘κ°κΈ° κΈ°λ₯μ΄ μ μ νκ² ν¬ν¨λμ΄ μμ΅λλ€.
app/src/main/java/module/RepositoryModule.kt (1)
31-34: μμ‘΄μ± μ£Όμ μ€μ μ΄ μ¬λ°λ₯΄κ² λμ΄μμ΅λλ€!NoticeRepositoryμ λ°μΈλ©μ΄ κΈ°μ‘΄ ν¨ν΄μ μ λ°λ₯΄κ³ μμΌλ©°, Hilt μμ‘΄μ± μ£Όμ μ΄ μ¬λ°λ₯΄κ² ꡬνλμ΄ μμ΅λλ€.
app/src/main/java/module/NetworkModule.kt (1)
94-98: NoticeAPI νλ‘λ°μ΄λ ꡬνμ΄ μ λμμ΅λλ€.κΈ°μ‘΄ API νλ‘λ°μ΄λλ€κ³Ό μΌκ΄λ ν¨ν΄μ λ°λ₯΄κ³ μμΌλ©°, μ±κΈν€ μ€μ½νκ° μ μ νκ² μ μ©λμμ΅λλ€.
presentation/src/main/java/viewModel/homes/HomesViewmodel.kt (1)
32-33: 곡μ§μ¬ν μν κ΄λ¦¬κ° μ ꡬνλμμ΅λλ€.κΈ°μ‘΄ μν κ΄λ¦¬ ν¨ν΄μ μΌκ΄λκ² λ°λ₯΄κ³ μμΌλ©°, StateFlowλ₯Ό μ μ νκ² μ¬μ©νκ³ μμ΅λλ€.
| @@ -0,0 +1,9 @@ | |||
| package reopoistory | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ν¨ν€μ§ μ΄λ¦ μ€ν μμ νμ
ν¨ν€μ§ μ΄λ¦μ μ€νκ° μμ΅λλ€. 'reopoistory'λ₯Ό 'repository'λ‘ μμ ν΄μΌ ν©λλ€.
-package reopoistory
+package repositoryπ Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| package reopoistory | |
| package repository |
| @GET("/{notice_id}") | ||
| suspend fun getNotice( | ||
| @Path("notice_id") noticeId: UUID, | ||
| ): List<NoticeResponse> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API μλν¬μΈνΈ κ²½λ‘ μμ λ° λ¬Έμν νμ
- GET μμ²μ κΈ°λ³Έ κ²½λ‘κ° λλ½λμ΄ μμ΅λλ€. μμ ν μλν¬μΈνΈ κ²½λ‘λ₯Ό μ§μ ν΄μΌ ν©λλ€.
- API μΈν°νμ΄μ€μ λ©μλμ λν λ¬Έμνκ° νμν©λλ€.
+/**
+ * 곡μ§μ¬ν κ΄λ ¨ API μΈν°νμ΄μ€
+ */
interface NoticeAPI {
+ /**
+ * νΉμ 곡μ§μ¬νμ μ‘°νν©λλ€.
+ *
+ * @param noticeId μ‘°νν 곡μ§μ¬ν ID
+ * @return 곡μ§μ¬ν μλ΅ λͺ©λ‘
+ */
- @GET("/{notice_id}")
+ @GET("/api/v1/notices/{notice_id}")
suspend fun getNotice(
@Path("notice_id") noticeId: UUID,
): List<NoticeResponse>
}π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @GET("/{notice_id}") | |
| suspend fun getNotice( | |
| @Path("notice_id") noticeId: UUID, | |
| ): List<NoticeResponse> | |
| /** | |
| * 곡μ§μ¬ν κ΄λ ¨ API μΈν°νμ΄μ€ | |
| */ | |
| interface NoticeAPI { | |
| /** | |
| * νΉμ 곡μ§μ¬νμ μ‘°νν©λλ€. | |
| * | |
| * @param noticeId μ‘°νν 곡μ§μ¬ν ID | |
| * @return 곡μ§μ¬ν μλ΅ λͺ©λ‘ | |
| */ | |
| @GET("/api/v1/notices/{notice_id}") | |
| suspend fun getNotice( | |
| @Path("notice_id") noticeId: UUID, | |
| ): List<NoticeResponse> | |
| } |
|
|
||
| @JsonClass(generateAdapter = true) | ||
| data class NoticeResponse ( | ||
| @Json(name = "noticeId") val noticeId: Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticeIdμ νμ μΌκ΄μ± λ¬Έμ
GetNoticeUseCaseμμλ UUID νμ
μ μ¬μ©νλλ° μ¬κΈ°μλ Int νμ
μ μ¬μ©νκ³ μμ΅λλ€. νμ
μΌκ΄μ±μ μν΄ UUIDλ‘ ν΅μΌνλ κ²μ΄ μ’κ² μ΅λλ€.
- @Json(name = "noticeId") val noticeId: Int,
+ @Json(name = "noticeId") val noticeId: UUID,π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @Json(name = "noticeId") val noticeId: Int, | |
| @Json(name = "noticeId") val noticeId: UUID, |
| fun getNotice(noticeId: UUID) = viewModelScope.launch { | ||
| getNoticeUseCase( | ||
| noticeId = noticeId | ||
| ) | ||
| .asResult() | ||
| .collectLatest { result -> | ||
| when (result) { | ||
| is Result.Loading -> { | ||
| _noticeUiState.value = NoticeUiState.Loading | ||
| } | ||
| is Result.Error -> { | ||
| _noticeUiState.value = NoticeUiState.Fail(result.exception) | ||
| } | ||
| is Result.Success -> { | ||
| _noticeUiState.value = NoticeUiState.Success(result.data) | ||
| } | ||
| } | ||
|
|
||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
UUID λ§€κ°λ³μμ λν null μμ μ±μ μΆκ°νμΈμ.
noticeIdκ° nullμΌ μ μλ μν©μ κ³ λ €νμ¬ nullable νμ
μΌλ‘ μ μΈνκ³ μ μ ν μ²λ¦¬λ₯Ό μΆκ°νλ κ²μ΄ μ’μ΅λλ€.
- fun getNotice(noticeId: UUID) = viewModelScope.launch {
+ fun getNotice(noticeId: UUID?) = viewModelScope.launch {
+ if (noticeId == null) {
+ _noticeUiState.value = NoticeUiState.Empty
+ return@launch
+ }
getNoticeUseCase(
noticeId = noticeId
)π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fun getNotice(noticeId: UUID) = viewModelScope.launch { | |
| getNoticeUseCase( | |
| noticeId = noticeId | |
| ) | |
| .asResult() | |
| .collectLatest { result -> | |
| when (result) { | |
| is Result.Loading -> { | |
| _noticeUiState.value = NoticeUiState.Loading | |
| } | |
| is Result.Error -> { | |
| _noticeUiState.value = NoticeUiState.Fail(result.exception) | |
| } | |
| is Result.Success -> { | |
| _noticeUiState.value = NoticeUiState.Success(result.data) | |
| } | |
| } | |
| } | |
| } | |
| fun getNotice(noticeId: UUID?) = viewModelScope.launch { | |
| if (noticeId == null) { | |
| _noticeUiState.value = NoticeUiState.Empty | |
| return@launch | |
| } | |
| getNoticeUseCase( | |
| noticeId = noticeId | |
| ) | |
| .asResult() | |
| .collectLatest { result -> | |
| when (result) { | |
| is Result.Loading -> { | |
| _noticeUiState.value = NoticeUiState.Loading | |
| } | |
| is Result.Error -> { | |
| _noticeUiState.value = NoticeUiState.Fail(result.exception) | |
| } | |
| is Result.Success -> { | |
| _noticeUiState.value = NoticeUiState.Success(result.data) | |
| } | |
| } | |
| } | |
| } |
| LazyColumn( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .heightIn(max = 10_000.dp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
LazyColumnμ μ΅λ λμ΄ κ°μ μ‘°μ νμΈμ.
10,000dpλ λ§€μ° ν° κ°μ λλ€. νλ©΄ ν¬κΈ°λ 컨ν μΈ μ λ§κ² μ μ ν κ°μΌλ‘ μ‘°μ νκ±°λ, μ νμ λμ§ μλ κ²μ΄ μ’μ΅λλ€.
- .heightIn(max = 10_000.dp)
+ .fillMaxHeight()π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .heightIn(max = 10_000.dp) | |
| .fillMaxHeight() |
| @Preview | ||
| @Composable | ||
| fun NoticeCardPreview() { | ||
|
|
||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
미리보기 ν¨μλ₯Ό ꡬννμΈμ.
λΉμ΄μλ NoticeCardPreview ν¨μμ μν λ°μ΄ν°λ₯Ό μΆκ°νμ¬ UIλ₯Ό 미리 νμΈν μ μλλ‘ κ΅¬ννμΈμ.
@Preview
@Composable
fun NoticeCardPreview() {
-
+ val sampleData = NoticeResponseModel(
+ noticeId = UUID.randomUUID(),
+ title = "곡μ§μ¬ν μ λͺ©",
+ content = "곡μ§μ¬ν λ΄μ©μ
λλ€. μ΄κ²μ μν λ°μ΄ν°μ
λλ€."
+ )
+ NoticeCardItem(data = sampleData)
}π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @Preview | |
| @Composable | |
| fun NoticeCardPreview() { | |
| } | |
| @Preview | |
| @Composable | |
| fun NoticeCardPreview() { | |
| val sampleData = NoticeResponseModel( | |
| noticeId = UUID.randomUUID(), | |
| title = "곡μ§μ¬ν μ λͺ©", | |
| content = "곡μ§μ¬ν λ΄μ©μ λλ€. μ΄κ²μ μν λ°μ΄ν°μ λλ€." | |
| ) | |
| NoticeCardItem(data = sampleData) | |
| } |
| var uuid by remember { mutableStateOf(UUID.randomUUID()) } | ||
| LaunchedEffect(Unit) { | ||
| noticeCallBack(uuid) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μμμ UUID μ¬μ©μ μ¬κ²ν νμΈμ.
μ΄κΈ° 곡μ§μ¬ν λ‘λμ UUID.randomUUID()λ₯Ό μ¬μ©νλ κ²μ μλνμ§ μμ λμμ μ λ°ν μ μμ΅λλ€. μ€μ λ°μ΄ν°λ₯Ό κ°μ Έμ€κΈ° μν μ μ ν IDλ₯Ό μ¬μ©νμΈμ.
- var uuid by remember { mutableStateOf(UUID.randomUUID()) }
+ var uuid by remember { mutableStateOf(DEFAULT_NOTICE_ID) }
LaunchedEffect(Unit) {
noticeCallBack(uuid)
}π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| var uuid by remember { mutableStateOf(UUID.randomUUID()) } | |
| LaunchedEffect(Unit) { | |
| noticeCallBack(uuid) | |
| } | |
| var uuid by remember { mutableStateOf(DEFAULT_NOTICE_ID) } | |
| LaunchedEffect(Unit) { | |
| noticeCallBack(uuid) | |
| } |
xx-lvr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μκ³ νμ ¨μ΄μ.
π‘ κ°μ
Notice μλ²ν΅μ μ μν μΈν μ νμ΅λλ€
π μμ λ΄μ©
Notice μλ²ν΅μ μ μν μΈν μ νμ΅λλ€
π λ³κ²½μ¬ν
Notice μλ²ν΅μ μ μν DatasourceIpml, Datasource, Repository, RespositoryImpl μ μΆκ°νμ΅λλ€.
πββοΈ μ§λ¬Έμ¬ν
π΄ μ¬μ©λ°©λ²
πΈ κΈ°ν
Summary by CodeRabbit