-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT/#59] 캘린더뷰 / 월간 캘린더 서버통신 로직 구현 #90
Conversation
# Conflicts: # feature/src/main/java/com/terning/feature/calendar/scrap/CalendarScrap.kt
…month # Conflicts: # feature/src/main/java/com/terning/feature/main/MainScreen.kt
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.
캘린더 이거 어케햇어요...? 대단하다,,.,..........
@@ -12,6 +14,10 @@ import javax.inject.Singleton | |||
@InstallIn(SingletonComponent::class) | |||
abstract class RepositoryModule { | |||
|
|||
@Binds | |||
@Singleton | |||
abstract fun scrapRepository(scrapRepositoryImpl: ScrapRepositoryImpl): ScrapRepository |
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.
bindScrapRepository 라는 네이밍 대신 scrapRepository로 쓰신 이유가 있나욤?
override suspend fun getScrapMonth(request: ScrapRequestDto): BaseResponse<List<ScrapResponseDto>> = | ||
BaseResponse( | ||
status = 200, | ||
message = "(월간) 스크랩된 공고 정보가 성공적으로 로드되었습니다.", |
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.
여기 하드코딩은 임의인가욥?
onDateSelected = { | ||
viewModel.updateSelectedDate(it) |
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.
newDate -> 로 직관적인 코드라고 생각했는데 삭제하신 이유가 있나용?!
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.
다시 붙여야겠네요!
isToday = day.date.isToday(), | ||
onDateSelected = onDateSelected | ||
) | ||
if(!day.isOutDate) { | ||
val index = day.date.dayOfMonth - 1 | ||
val index = day.date.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd")) |
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.
자바 코드까지..
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.
정말 멋있어...
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.
안쓰는 import 삭제해주세요!
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.
굿굿~!! 넘 잘해서 코리 달 게 없어지고 있어요... 최고!!
수정하구 나면 한 번 더 노티 부탁드려용!
) | ||
} | ||
_calendarSideEffect.emit(CalendarSideEffect.ShowToast(R.string.server_success)) |
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.
성공했을 때는 따로 토스트 안 띄워줘도 될 것 같아요!!
} | ||
} | ||
|
||
|
||
@Composable | ||
fun HorizontalCalendar( |
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.
줄바꿈 조금만 신경 써주세요!
viewModel: CalendarViewModel = hiltViewModel() | ||
) { | ||
val scrapState by viewModel.scrapCalendarState.collectAsState() | ||
|
||
LaunchedEffect(key1 = listState) { |
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.
collectAsState() 바꿔주세용!
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.
캘린더,,, 이걸 해낸다구?!?!?!?!?!??!!?? 이게 이석준이지~~ 진짜 수고하셨습니당❤️❤️❤️
@@ -12,6 +16,10 @@ import javax.inject.Singleton | |||
@InstallIn(SingletonComponent::class) | |||
abstract class DataSourceModule { | |||
|
|||
@Binds | |||
@Singleton | |||
abstract fun bindScrapRepository(scrapDataSourceImpl: ScrapDataSourceImpl): ScrapDataSource |
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.
여기 위치가 DataSourceModule
이라서 bindScrapDataSource
로 네이밍 수정하는건 어떨까요??
fun getMockScrapList(year: Int, month: Int): List<ScrapResponseDto> { | ||
val deadline = month.toString().padStart(2, '0') | ||
|
||
return when (month % 4) { | ||
0 -> { | ||
listOf( | ||
ScrapResponseDto( | ||
deadline = "${year}-${deadline}-13", | ||
scraps = listOf( | ||
ScrapResponseDto.Scrap( | ||
scrapId = 1, | ||
title = "제목1", | ||
color = "#FFED4E54" | ||
), |
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.
머지하기 전에 꼭 확인해주세요!!
viewModel.calendarSideEffect.flowWithLifecycle(lifecycle = lifecycleOwner.lifecycle) | ||
.collect { sideEffect -> | ||
when (sideEffect) { | ||
is CalendarSideEffect.ShowToast -> context.toast(sideEffect.message) |
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.
sideEffect 최고에요~!~!
isToday = day.date.isToday(), | ||
onDateSelected = onDateSelected | ||
) | ||
if(!day.isOutDate) { | ||
val index = day.date.dayOfMonth - 1 | ||
val index = day.date.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd")) |
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.
정말 멋있어...
…month # Conflicts: # app/src/main/java/com/terning/point/di/DataSourceModule.kt # app/src/main/java/com/terning/point/di/RepositoryModule.kt # app/src/main/java/com/terning/point/di/ServiceModule.kt
…month # Conflicts: # app/src/main/java/com/terning/point/di/DataSourceModule.kt # app/src/main/java/com/terning/point/di/ServiceModule.kt
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.
LGTM~
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.
LGTM~
⛳️ Work Description
- 월간 스크랩 목록 서버통신
- 일간 스크랩 목록 서버통신
📸 Screenshot
default.mp4
📢 To Reviewers