-
Notifications
You must be signed in to change notification settings - Fork 2
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/#73] 여행 대시 보드 뷰 / 서버 통신 구현 #83
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.
이유빈 선생님 늦은 시간까지 고생이 참 많으십니다.
) : DashBoardDataSource { | ||
override suspend fun getTripList(progress: String): BaseResponse<DashBoardResponseDto> = |
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 toDashBoardEntity() = | ||
DashBoardModel(name, trips.map { | ||
it.toTripsModel() | ||
}) |
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.
함수명도 model로 수정해주세요~
private val dashBoardSource: DashBoardDataSource | ||
) : DashBoardRepository { |
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.
여기도...ㅎㅎ
TabLayoutMediator(binding.tabDashboard, binding.vpDashboard) { tab, pos -> | ||
tab.text = tabTextList[pos] | ||
}.attach() | ||
} | ||
|
||
private fun setTravelerName() { | ||
val progress = "incomplete" |
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.
이렇 중요한 텍스트는 const val로 관리해주시면 좋을 것 같아요 ~
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.
아래 뷰모델에서 지정을 해줬으니, 그거 가져와서 임포트 하시는게 더 좋을 듯
BaseActivity<ActivityTripDashBoardBinding>(R.layout.activity_trip_dash_board) { | ||
|
||
private val tabTextList = listOf(TAB_ONGOING, TAB_COMPLETED) | ||
|
||
private val viewModel by viewModels<DashBoardViewModel>() | ||
|
||
var name: String? = null |
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 com.going.presentation.databinding.ItemDashBoardCompletedBinding | ||
import com.going.ui.extension.ItemDiffCallback | ||
|
||
class CompletedAdapter( | ||
private val listener: OnDashBoardSelectedListener | ||
) : ListAdapter<CompletedListModel, CompletedViewHolder>(diffUtil) { | ||
) : ListAdapter<DashBoardModel.DashBoardTripModel, CompletedViewHolder>(diffUtil) { |
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.
임포트 확인해주세요 ~
|
||
} | ||
|
||
private fun setRecyclerView() { |
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.
initAdapter가 더 어울릴듯 ~
} | ||
|
||
private fun setTripList() { | ||
val progress = "complete" |
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.
요 친구도 위에랑 동일하게 다뤄주세요 ~
android:layout_width="210dp" | ||
android:layout_height="324dp" |
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.
?? 비율로 확인해주세요 ~
android:id="@+id/iv_dashboard_empty" | ||
android:layout_width="210dp" | ||
android:layout_height="324dp" | ||
android:layout_marginBottom="100dp" |
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.
유비니 첫 api 통신 축하축하!!!
근데 empty일때도 뷰 보고시퍼용... 담엔 같이 올려주기~
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="28dp" | ||
android:gravity="center" |
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.
width를 wrapcontent로 하고 start와 end를 parent로 맞춰준다면 gravity center 안써도 될 것 같아용~
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 toDashBoardEntity() = | ||
DashBoardModel(name, trips.map { | ||
it.toTripsModel() |
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.
.map 이용 조아욥
interface DashBoardService { | ||
@GET("api/trips") | ||
suspend fun getTripList( | ||
@Query("progress") progress: String |
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.
조아요 쿼리
android:id="@+id/iv_dashboard_empty" | ||
android:layout_width="210dp" | ||
android:layout_height="324dp" | ||
android:layout_marginBottom="100dp" |
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.
??.... ㅎㅎ
@@ -95,7 +95,7 @@ | |||
|
|||
<!--trip_dash_board--> | |||
<string name="dashboard_tv_title">%s님의 여행</string> | |||
<string name="dashboard_tv_empty">생성된 여행이 없어요.</string> | |||
<string name="dashboard_tv_empty">새로운 여행을 시작해 보세요</string> |
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.
넹!
⛳️ Work Description
📸 Screenshot
default.mp4
📢 To Reviewers