-
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
[7주차/필수] Repository 활용_compose #25
base: develop-compose
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.
컴포즈도 수고하셨습니다 !
val userService by lazy { ApiFactory.create<UserService>(AUTH_BASE_URL) } | ||
val authService by lazy { ApiFactory.create<AuthService>(AUTH_BASE_URL) } | ||
val friendService by lazy { ApiFactory.create<FriendService>(FRIEND_BASE_URL) } |
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 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.
상수화 굿 ~
@@ -113,7 +112,7 @@ class MainActivity : ComponentActivity() { | |||
} | |||
|
|||
1 -> { |
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.
여기도 selectedItem들도 상수화해주면 좋을 것 같아요 ! (0, 1, 2 한번에 코멘트 달고 싶었는데 왜 한줄밖에 클릭이 안 될까요 .. 🤣😂)
val intent = Intent(context, LoginActivity::class.java) | ||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK | ||
context.startActivity(intent) |
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.
intent flag 사용 추가하셨군요 !! 굿굿
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 suspend fun login(request: RequestLoginDto): Response<ResponseLoginDto> { | ||
return authService.login(request) | ||
} |
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 suspend fun login(request: RequestLoginDto): Response<ResponseLoginDto> { | |
return authService.login(request) | |
} | |
override suspend fun login(request: RequestLoginDto): Response<ResponseLoginDto> = authService.login(request) |
이런 식으로 작성할 수도 있습니당
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 androidx.lifecycle.ViewModel | ||
import androidx.lifecycle.ViewModelProvider | ||
|
||
class BaseViewModelFactory<T>(private val creator: () -> T) : ViewModelProvider.Factory { |
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.
👍👍👍
Related issue 🛠
Work Description ✏️
Screenshot 📸
Screen_recording_20240605_161814.mp4
To Reviewers 📢
작업하면서 커밋 자주 하는걸 깜빡했습니다...