-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/android/#35 join event : 일정 참여, 일정 멤버 자세히 보기, 알림 화면 구현 #163
Feature/android/#35 join event : 일정 참여, 일정 멤버 자세히 보기, 알림 화면 구현 #163
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.
수고하셨습니다~👍👍
@JsonClass(generateAdapter = true) | ||
data class EventMember( | ||
@Json(name = "id") | ||
val id: Int, | ||
@Json(name = "nickname") | ||
val nickname: String, | ||
@Json(name = "profile") | ||
val profile: String | ||
) : Parcelable { |
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.
args로 전달하기 위해 Parcelable로 선언한 부분인가요?
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.
네 맞습니다!!! 이벤트 멤버를 전달해서 더보기에서 사용하기 위해 Parcelable로 구현을 했습니다.
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.
이거 list를 data class로 한번 더 감싸면 serealizable만 상속받아도 전달할 수 있더라고요! 뭐가 더 나은지는 모르겠어요...
@JsonClass(generateAdapter = true) | ||
data class UserWithFollowStatus( | ||
@Json(name = "id") | ||
val id: Int, | ||
@Json(name = "nickname") | ||
val nickname: String, | ||
@Json(name = "profile") | ||
val profile: String, | ||
@Json(name = "isFollowed") | ||
val isFollowed: Boolean, | ||
val isMe: 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.
이 부분은 팔로우랑 일정 초대 부분을 묶어서 구현해야할 것 같아서 제가 나중에 수정할 수도 있을 것 같아요
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.
넵넵 좋습니다. isMe
부분은 자기를 검색했을 때 버튼을 보여주지 않기 위해서 사용을 했고 repository에서 자기와 닉네임이 같은 지 검사하여 isMe 부분을 변경하는 로직을 함께 작성 했어요!
@POST("follow") | ||
suspend fun follow(@Body followRequest: FollowRequest) | ||
|
||
@DELETE("follow/follow") | ||
suspend fun unFollow(@Query("userId") userId: 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.
👍👍
override fun createFragment(position: Int): Fragment { | ||
return when (position) { | ||
0 -> { | ||
FollowNotificationFragment() | ||
} | ||
|
||
1 -> { | ||
EventNotificationFragment() | ||
} | ||
else -> { | ||
GroupNotificationFragment() | ||
} |
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.
저도 이 부분에서 고민을 많이 했는데, 재활용하여 Fragment를 만들어볼 수도 있을 것 같아요~
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 나온 부분도 없고 정확히 어떻게 할지 몰라서 우선 크게 만들어놓고 자세히 구현할 때 합치거나 그냥 구현할 지 정할 것 같아서 일단 범용적으로 크게 만들어놓았습니다!!
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.
좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요
@JsonClass(generateAdapter = true) | ||
data class EventMember( | ||
@Json(name = "id") | ||
val id: Int, | ||
@Json(name = "nickname") | ||
val nickname: String, | ||
@Json(name = "profile") | ||
val profile: String | ||
) : Parcelable { |
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.
이거 list를 data class로 한번 더 감싸면 serealizable만 상속받아도 전달할 수 있더라고요! 뭐가 더 나은지는 모르겠어요...
import com.teameetmeet.meetmeet.databinding.ItemEventNotificationBinding | ||
|
||
class EventNotificationAdapter: ListAdapter<EventNotification, EventNotificationViewHolder>(diffCallback) { | ||
override fun onCreateViewHolder( |
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.
프래그먼트 세개, 아답터 세개, 뷰모델 세개인가요..?ㅜㅡㅜ..
개요
설명