-
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/#91] 캘린더뷰 / 스크랩 목록 서버통신 #101
Conversation
[FEAT/#72] 소셜 로그인 / 서버통신 로직 구현
…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
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.
캘린더 마스터 석준오빠,, 넘 잘해서 코리 달 게 없네요,, 수고했어요!
year: Int, month: Int | ||
) = viewModelScope.launch { | ||
withContext(Dispatchers.IO) { | ||
calendarRepository.getScrapMonthList(year, month) | ||
}.fold( |
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.
왕,, Dispatchers.IO 까지!! 넘넘 수고 많았다,,,
onSuccess = { | ||
_calendarWeekState.update { currentState -> | ||
currentState.copy( | ||
/*loadState = if (it.isNotEmpty()) UiState.Success(it) else UiState.Empty*/ | ||
loadState = UiState.Success(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.
덕분에 update라는 기능 알아갑니다!
import kotlinx.coroutines.withContext | ||
import timber.log.Timber | ||
import java.time.LocalDate |
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.
Timber 안 쓰이면 지워줘도 될 것 같아요!
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.
진짜 멋있다~~~ 최고최고!!!!
fun getScrapMonthList( | ||
year: Int, month: Int | ||
) = viewModelScope.launch { | ||
withContext(Dispatchers.IO) { |
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.
우왕 Dispatchers.IO....!!!! 짱이다
_calendarListState.update { currentState -> | ||
currentState.copy( | ||
loadState = if (it.isNotEmpty()) UiState.Success(it) else UiState.Empty | ||
//loadState = UiState.Success(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.
이거 안쓰는거면 삭제해주세요!!
.fillMaxHeight() | ||
.background(Back) | ||
) { | ||
when (scrapState.loadState) { |
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.
오... 저도 LazyColumn 안에서 when문으로 확인하는 방식을 고려해봐야겠네요..!! 굿~!~!
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.
이것보단 Paging 처리하는 방식이 훨씬 나아보이는데 지금은 못하겠네요ㅎㅎ,,
⛳️ Work Description
📸 Screenshot
default.mp4
📢 To Reviewers