generated from NOW-SOPT-ANDROID/now-sopt-android-template
-
Notifications
You must be signed in to change notification settings - Fork 0
[7주차/필수] Repository 활용_compose #25
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
Open
gaeulzzang
wants to merge
1
commit into
develop-compose
Choose a base branch
from
feat/week_compose7
base: develop-compose
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ose/remote/request/RequestChangePwdDto.kt → ...ata/remote/request/RequestChangePwdDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...compose/remote/request/RequestLoginDto.kt → ...se/data/remote/request/RequestLoginDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ompose/remote/request/RequestSignUpDto.kt → ...e/data/remote/request/RequestSignUpDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/remote/response/ResponseChangePwdDto.kt → ...a/remote/response/ResponseChangePwdDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ose/remote/response/ResponseFriendsDto.kt → ...ata/remote/response/ResponseFriendsDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mpose/remote/response/ResponseLoginDto.kt → .../data/remote/response/ResponseLoginDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...pose/remote/response/ResponseSignUpDto.kt → ...data/remote/response/ResponseSignUpDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...se/remote/response/ResponseUserInfoDto.kt → ...ta/remote/response/ResponseUserInfoDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...now/compose/remote/service/AuthService.kt → ...ompose/data/remote/service/AuthService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...w/compose/remote/service/FriendService.kt → ...pose/data/remote/service/FriendService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...now/compose/remote/service/UserService.kt → ...ompose/data/remote/service/UserService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/sopt/now/compose/data/repositoryImpl/AuthRepositoryImpl.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||
| package com.sopt.now.compose.data.repositoryImpl | ||||||||||
|
|
||||||||||
| import com.sopt.now.compose.data.remote.request.RequestLoginDto | ||||||||||
| import com.sopt.now.compose.data.remote.request.RequestSignUpDto | ||||||||||
| import com.sopt.now.compose.data.remote.response.ResponseLoginDto | ||||||||||
| import com.sopt.now.compose.data.remote.response.ResponseSignUpDto | ||||||||||
| import com.sopt.now.compose.data.remote.service.AuthService | ||||||||||
| import com.sopt.now.compose.domain.AuthRepository | ||||||||||
| import retrofit2.Response | ||||||||||
|
|
||||||||||
| class AuthRepositoryImpl(private val authService: AuthService) : AuthRepository { | ||||||||||
| override suspend fun signUp(request: RequestSignUpDto): Response<ResponseSignUpDto> { | ||||||||||
| return authService.signUp(request) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| override suspend fun login(request: RequestLoginDto): Response<ResponseLoginDto> { | ||||||||||
| return authService.login(request) | ||||||||||
| } | ||||||||||
|
Comment on lines
+16
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
이런 식으로 작성할 수도 있습니당 |
||||||||||
| } | ||||||||||
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/sopt/now/compose/data/repositoryImpl/FollowerRepositoryImpl.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package com.sopt.now.compose.data.repositoryImpl | ||
|
|
||
| import com.sopt.now.compose.data.remote.request.RequestChangePwdDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseChangePwdDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseFriendsDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseUserInfoDto | ||
| import com.sopt.now.compose.data.remote.service.FriendService | ||
| import com.sopt.now.compose.data.remote.service.UserService | ||
| import com.sopt.now.compose.domain.FollowerRepository | ||
| import retrofit2.Response | ||
|
|
||
| class FollowerRepositoryImpl( | ||
| private val userService: UserService, | ||
| private val friendService: FriendService | ||
| ) : FollowerRepository { | ||
| override suspend fun getUserInfo(userId: Int): Response<ResponseUserInfoDto> { | ||
| return userService.getUserInfo(userId) | ||
| } | ||
|
|
||
| override suspend fun changeUserPwd( | ||
| userId: Int, | ||
| request: RequestChangePwdDto | ||
| ): Response<ResponseChangePwdDto> { | ||
| return userService.changeUserPwd(userId, request) | ||
| } | ||
|
|
||
| override suspend fun getFriends(page: Int): Response<ResponseFriendsDto> { | ||
| return friendService.getFriends(page) | ||
| } | ||
| } |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/sopt/now/compose/domain/AuthRepository.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.sopt.now.compose.domain | ||
|
|
||
| import com.sopt.now.compose.data.remote.request.RequestLoginDto | ||
| import com.sopt.now.compose.data.remote.request.RequestSignUpDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseLoginDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseSignUpDto | ||
| import retrofit2.Response | ||
|
|
||
| interface AuthRepository { | ||
| suspend fun signUp(request: RequestSignUpDto): Response<ResponseSignUpDto> | ||
| suspend fun login(request: RequestLoginDto): Response<ResponseLoginDto> | ||
| } |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/sopt/now/compose/domain/FollowerRepository.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.sopt.now.compose.domain | ||
|
|
||
| import com.sopt.now.compose.data.remote.request.RequestChangePwdDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseChangePwdDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseFriendsDto | ||
| import com.sopt.now.compose.data.remote.response.ResponseUserInfoDto | ||
| import retrofit2.Response | ||
|
|
||
| interface FollowerRepository { | ||
| suspend fun getUserInfo(userId: Int): Response<ResponseUserInfoDto> | ||
| suspend fun changeUserPwd( | ||
| userId: Int, | ||
| request: RequestChangePwdDto | ||
| ): Response<ResponseChangePwdDto> | ||
|
|
||
| suspend fun getFriends(page: Int): Response<ResponseFriendsDto> | ||
| } |
31 changes: 0 additions & 31 deletions
31
app/src/main/java/com/sopt/now/compose/feature/home/HomeScreen.kt
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
app/src/main/java/com/sopt/now/compose/feature/mypage/MyPageViewModel.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mpose/feature/changePwd/ChangePwdState.kt → .../presentation/changePwd/ChangePwdState.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...e/feature/changePwd/ChangePwdViewModel.kt → ...sentation/changePwd/ChangePwdViewModel.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/sopt/now/compose/data/Friend.kt → ...t/now/compose/presentation/home/Friend.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
지연 초기화 아주 좋네요 !!