-
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
Feat/week4 essential #9
base: develop
Are you sure you want to change the base?
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.
고생했습니두
inline fun <reified T> create(url: String): T { | ||
this.url = url | ||
return retrofit.create<T>(T::class.java) | ||
} |
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.
url생성을 구분하여 생성하는거 좋은거 같습니다!
data class ResponseGetFollwerDto( | ||
@SerialName("page") | ||
val page: Int, | ||
@SerialName("per_page") | ||
val per_page: Int, | ||
@SerialName("total") | ||
val total: Int, | ||
@SerialName("total_pages") | ||
val total_pages: Int, | ||
@SerialName("data") | ||
val data: List<ResponseData>, | ||
@SerialName("support") | ||
val support: ResponseSupport |
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.
수정하겠습니다!
private val homeViewModel by viewModels<HomeViewModel>() | ||
private val viewModel by viewModels<EditMyPageViewModel>() |
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.
homeViewModel처럼 네이밍하면 좋을덧
@@ -27,7 +30,7 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginStart="30dp" | |||
android:text="@string/nickName_title" | |||
android:text="@={viewModel.nickName}" |
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.
양방향데바!
Glide.with(binding.root) | ||
.load(friendData.reqresData?.avatar) | ||
.into(ivProfile) |
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.
coil이란것도 공부하면 좋을덧
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.
Coroutine Image Loader 좋은 정보감사합니다!
} | ||
} | ||
|
||
private fun processLogin(response: Response<ResponseLoginDto>) { | ||
val data: ResponseLoginDto = response.body()!! |
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.
흐음 requireNotNull사용하면 괜찮으려나요??
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.
고생했어요! 양방향까지 적용하다니 최고👍🏻
app/build.gradle
Outdated
|
||
|
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 retrofit2.http.GET | ||
|
||
interface FollowerService { | ||
@GET("https://reqres.in/api/users?page=2") |
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.
왜 여기에 url이 전부 들어갔을까요?
Base url 따로 분리해주세요!
? 이 있는 경우 사용하는 어노테이션이 있습니다. 지금은 2번 페이지만 고정으로 받아오고 있네요!
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.
네엡...!
@SerialName("page") | ||
val page: Int, | ||
@SerialName("per_page") | ||
val per_page: 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.
Camel, snake 중 하나만 골라서 적용해볼까요? 다른 data class는 카멜이네요!
// var music: Music?, | ||
val type: Int, | ||
val MBTI: String?, | ||
val intro: String?, | ||
val id: String? | ||
// var MBTI: String?, | ||
// var intro: 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.
이 주석들은 뭘까요?
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.
흠흠 그러게요 뭘까요?? 얼렁 삭제하겠습니다..
null, | ||
nickname, | ||
// 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.
주석 삭제해주세요~
musicArtist = "데이식스", | ||
id = "jihyune_hi", | ||
nickname = "경지현", | ||
musicTitle = "숲", |
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 getProfile(index: Int): Profile = mockProfileList[index] | ||
fun getMockProfileLIst() = mockProfileList | ||
|
||
// fun getResponseDataList(): MutableList<Profile> = _responseDataList |
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.
;-)
Profile(getName(data), data.email, data.avatar, data.id) | ||
|
||
private fun getName(data: ResponseData): String = data.first_name + " " + data.last_name |
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.
getName()보다는
val fullName = data. ~
변수로 쓰고 convertDataToProfile함수 안에 넣어주는 건 어떤가요?
단순히 취향차이지만 함수가 중간에 껴있는 것보단 전부 파라미터가 변수인게 어떨까 싶습니다!
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="match_parent" | ||
android:layout_height="match_parent"> | ||
|
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.
두 줄이네요!
한 줄 삭제 부탁드립니다
@@ -60,7 +62,7 @@ | |||
android:layout_height="wrap_content" | |||
android:hint="@string/pw_hint" | |||
android:inputType="textPassword" | |||
android:text = "@={viewModel.password}" | |||
android:text="@={viewModel.password}" |
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.
이번주도 고생하셨습니다 :)
binding = ActivityHomeBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
binding = DataBindingUtil.setContentView(this, R.layout.activity_home) | ||
binding.lifecycleOwner = this |
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.
저도 알고 싶습니다!
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.
요번주도 수고 많으셨습니다!! 합세도 파이팅입니닷👍👍
@@ -2,6 +2,7 @@ package org.sopt.dosopttemplate.util | |||
|
|||
import android.content.Context | |||
import android.widget.Toast | |||
import androidx.lifecycle.MutableLiveData | |||
|
|||
object ToastMaker { |
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.
이렇게 토스트를 유틸로 빼서 쓰는거군요! 오늘도 한 수 배워갑니닷!
binding = ActivityHomeBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
binding = DataBindingUtil.setContentView(this, R.layout.activity_home) | ||
binding.lifecycleOwner = this |
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.
저도 알고 싶습니다!
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
Recording_2023-11-16-13-08-55.mp4
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
감사합니다 모두들 꾸벅
그 뭐냐 선택 과제는 늦게 봐서 못했어요,,,, 하지만 해보도록 하겠습니다. 심화에 도전도 해보겠숩니다.