-
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
내가 작성한 글 확인하기 기능 구현 #55
Conversation
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.
고생하셨습니다
posts.filter { postPreview -> | ||
val date = Date(postPreview.date) | ||
Log.d("TODOREMOVE", "${date.year}, ${date.month + 1}, ${date.date}") | ||
date.month + 1 == month && year == date.year && day == date.date |
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.
넵 맞습니다
|
||
override suspend fun getMyPostPreviews(uid: Long): Result<List<PostPreview>> { | ||
val response = postService.myPosts(uid) | ||
response.body()?.map { it.toPostPreview() } ?: throw Exception(response.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.
추후에 Exception도 만들어야겠네요...
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.
넵 그리고 최근에 post 서버 내려갔었을 때 글 불러오니까 앱 터지더라구요 예외처리 안되어있는 부분 찾아서 해줘야 할 것 같습니다.
data class PostPreview( | ||
val poster: User, |
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.
author는 어떨까요
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.
네이밍에 많이 신경쓰지 못했네요..하핫 좀더 신경써서 고쳐보죠
val id: Long, | ||
val liked: Boolean = false, |
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.
요런 불린 타입 변수들 변수명이 is~~면 조금 더 명확해서 좋았던 것 같은데 나중에 전체적으로 바꿔봐요..!
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.
네 좋습니다
@@ -49,7 +49,7 @@ fun AppScreen(startWorker: () -> Unit) { | |||
val splashViewModel = koinViewModel<SplashViewModel>() | |||
|
|||
val splashState = splashViewModel.splashState.collectAsStateWithLifecycle() | |||
AppScreenContent(startWorker, navController) | |||
// AppScreenContent(startWorker, navController) |
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.
밑에
when (splashState.value) {
SplashState.InitialState -> SplashScreen()
SplashState.SignInState -> SignInScreen { splashViewModel.finishSignIn() }
SplashState.SignedInState -> AppScreenContent(startWorker, navController)
}
코드에서 AppScreenContent 를 실행하는데 중복코드여서 주석했습니다!
😎 작업 내용
🧐 변경된 내용
🥳 동작 화면
🤯 이슈 번호
이슈 수정 후
🥲 비고