Skip to content
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

2주차 과제 #5

Merged
merged 56 commits into from
Nov 1, 2023
Merged

2주차 과제 #5

merged 56 commits into from
Nov 1, 2023

Conversation

Sangwook123
Copy link
Member

@Sangwook123 Sangwook123 commented Oct 27, 2023

📌𝘐𝘴𝘴𝘶𝘦𝘴

#4

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • 멀티 뷰 타입 리사이클러 뷰
  • sealed class 사용
  • 생일인 사람 뷰 타입

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

device-2023-10-27-145558.webm

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

room db를 활용했습니다.

  • 소현이 데이터 쇽샥

Copy link
Member

@Eonji-sw Eonji-sw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제겐 아직 너무 상위 코드인.. 역시 갓상욱,,, 많이 공유해주세오

FriendInfoEntity::class
], version = 1
)
abstract class FriendDataBase : RoomDatabase() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 한번도 직접 구현하는 코드에서 abstract를 사용해본 경험이 없는데.. 많이 배워가요..!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 room 이번에 한번 공부해봐야겠어요..!

val id: Int?,
val name: String,
val birthday: String,
val music: String?,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진짜... 모든 걸 다 구현한.. 멋져요.... 뒤에서 후광이..!!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 생일과 뮤직도 구현하셨네요 ㅎㅎ 저는 시험 이슈로 안 했는데 저도 이제 슬슬 구현해보겠어유

@ColumnInfo(name = "image_uri")
val imageUri: String?,
) {
companion object {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

companion object 개념을 처음 봐요. 정적 멤버를 정의할 때 사용하는거군여..? 또 하나 알아가요!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 companion object 메모메모 합니다

@@ -4,5 +4,5 @@ data class User(
val id: String? = "",
val pw: String? = "",
val nickname: String? = "",
val hobby: String? = ""
val discription: String? = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

취미도 궁금해요~

Copy link
Member

@Marchbreeze Marchbreeze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아니 진짜........말안되는데..........? 미쳤다 진짜

import org.sopt.dosopttemplate.data.model.local.FriendInfoEntity

@Dao
interface FriendInfoDao {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Room 쓰는거 폼 진짜 말안되네 이남자... .....

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Room? 당장 구글링 해봐야겠다.

Comment on lines +77 to +82
when(item.itemId) {
R.id.menu_do_android -> navigateTo<DoAndroidFragment>()
R.id.menu_home -> navigateTo<HomeFragment>()
R.id.menu_my_page -> navigateTo<MyPageFragment>()
}
true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 코드로는 어떠한 item이 와도 무조건 true를 반환할 것 같습니다 !
else를 활용해서 item값이 이상하게 왔을 때 false로 넘어가도록 처리가 필요할 것 같아요 ~~

}.onSuccess {
_logoutState.value = UiState.Success(CODE_LOGOUT)
}.onFailure { t ->
_logoutState.value = UiState.Failure("${t.message}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.message.toString() 은 어떠신지 !

import java.time.LocalDate

sealed class HomeModel {
abstract val id: Int?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 이거 두면 ListAdapter new old 비교 되겠네요...

@CHANGEL1004
Copy link

CHANGEL1004 commented Oct 29, 2023

와비로서 몰랐던 구현 기능들 많이 배워갑니다 ㅎㅎ 상호오라버니의 리뷰까지 참고해서
많은 걸 알아가여,,, 상욱님의 코드 모두 이해하는 그날까지 열공할게요.

Copy link

@amourxyoung amourxyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨슴다 👍

FriendInfoEntity::class
], version = 1
)
abstract class FriendDataBase : RoomDatabase() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 room 이번에 한번 공부해봐야겠어요..!

private fun initBnvItemSelectedListener() {
binding.bnvMain.setOnItemSelectedListener { item ->
when(item.itemId) {
R.id.menu_do_android -> navigateTo<DoAndroidFragment>()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오,, 이거 쇽샥할게욤 좋은 것 같네용

viewModel.friendListState.observe(viewLifecycleOwner) { state ->
when (state) {
is UiState.Success -> {
submitHomeList(state)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

데이터를 불러올 때도 state별로 나눠서 보여주니까 훨씬 좋은 것 같네요 ! UiState를 능수능란하게 다루시는군요,, 많이 배우고 갑니다

@Sangwook123 Sangwook123 merged commit 7fa9c2c into develop Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
필수 1️⃣ 필수 과제
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants