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

Feat/week4 essential #9

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Feat/week4 essential #9

wants to merge 12 commits into from

Conversation

jihyun0v0
Copy link
Contributor

📌𝘐𝘴𝘴𝘶𝘦𝘴

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

  • 회원가입, 로그인 API구현
  • open API로 친구 목록 구현하기

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

Recording_2023-11-16-13-08-55.mp4

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

감사합니다 모두들 꾸벅
그 뭐냐 선택 과제는 늦게 봐서 못했어요,,,, 하지만 해보도록 하겠습니다. 심화에 도전도 해보겠숩니다.

@jihyun0v0 jihyun0v0 added the 필수과제 DOSOPT 필수과제 label Nov 16, 2023
@jihyun0v0 jihyun0v0 self-assigned this Nov 16, 2023
Copy link

@lsakee lsakee left a comment

Choose a reason for hiding this comment

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

고생했습니두

Comment on lines 35 to 38
inline fun <reified T> create(url: String): T {
this.url = url
return retrofit.create<T>(T::class.java)
}
Copy link

Choose a reason for hiding this comment

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

url생성을 구분하여 생성하는거 좋은거 같습니다!

Comment on lines 29 to 41
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
Copy link

Choose a reason for hiding this comment

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

별건아닌데 순서땜에 가독성이 안좋아보여요 ㅠ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정하겠습니다!

Comment on lines 14 to 15
private val homeViewModel by viewModels<HomeViewModel>()
private val viewModel by viewModels<EditMyPageViewModel>()
Copy link

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}"
Copy link

Choose a reason for hiding this comment

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

양방향데바!

Comment on lines +14 to +16
Glide.with(binding.root)
.load(friendData.reqresData?.avatar)
.into(ivProfile)
Copy link

Choose a reason for hiding this comment

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

coil이란것도 공부하면 좋을덧

Copy link
Contributor Author

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()!!
Copy link

Choose a reason for hiding this comment

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

!!안쓰고 해보셈!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

흐음 requireNotNull사용하면 괜찮으려나요??

Copy link

@stellar-halo stellar-halo left a 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
Comment on lines 23 to 24


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")

Choose a reason for hiding this comment

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

왜 여기에 url이 전부 들어갔을까요?
Base url 따로 분리해주세요!

? 이 있는 경우 사용하는 어노테이션이 있습니다. 지금은 2번 페이지만 고정으로 받아오고 있네요!

Copy link
Contributor Author

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,

Choose a reason for hiding this comment

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

Camel, snake 중 하나만 골라서 적용해볼까요? 다른 data class는 카멜이네요!

Comment on lines 33 to 36
// var music: Music?,
val type: Int,
val MBTI: String?,
val intro: String?,
val id: String?
// var MBTI: String?,
// var intro: String?,

Choose a reason for hiding this comment

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

이 주석들은 뭘까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

흠흠 그러게요 뭘까요?? 얼렁 삭제하겠습니다..

null,
nickname,
// null,

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 = "숲",

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

Choose a reason for hiding this comment

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

;-)

Comment on lines 44 to 46
Profile(getName(data), data.email, data.avatar, data.id)

private fun getName(data: ResponseData): String = data.first_name + " " + data.last_name

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함수 안에 넣어주는 건 어떤가요?
단순히 취향차이지만 함수가 중간에 껴있는 것보단 전부 파라미터가 변수인게 어떨까 싶습니다!

Copy link
Contributor Author

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">

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}"

Choose a reason for hiding this comment

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

양방향 좋아요

Copy link
Member

@chattymin chattymin left a 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
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.

저도 알고 싶습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

좀만 더 공부해서 톡방에 올리겠숩니다.>!

Copy link

@crownjoe crownjoe left a 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 {

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

Choose a reason for hiding this comment

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

저도 알고 싶습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
필수과제 DOSOPT 필수과제
Projects
None yet
Development

Successfully merging this pull request may close these issues.

week4 필수과제
5 participants