-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat/#248] 프로필 리팩토링 완료, 이슈 일부 수정 #258
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
477e285
chore: 프로필 정보, 수정 레거시 코드 제거
ThirFir 4bc41a6
fix: 저장한 장소 데이터 변화 실시간 감지 되지 않던 것 수정
ThirFir 8870b58
chore: 프로필 관련 API 레거시 코드 제거 및 새 구현으로 마이그레이션
ThirFir 8c98cc2
fix: 지역인증 건너뛰기 display 안되던 문제, 뒤로가기 오동작 문제 수정
ThirFir 68fa63c
feat: 데이터 변화 감지 기능 인터페이스 구현
ThirFir 69544fe
refactor: 인증 지역 데이터 변화 뷰모델에서 감지하도록 수정
ThirFir 0759372
refactor: Presigned url 로직 프로필 Repo -> AconApp Repo로 이동
ThirFir e09d5ae
fix: UpdateProfileRequest 매핑 함수 구현 중 생년월일 padding 붙이는 로직 이슈 수정
ThirFir 90c6059
fix: 초기 지역인증에서 건너뛰기 시 다음화면 이동 로직 정상화
ThirFir 80ffe65
fix: 지역인증 건너뛰기 못 하는 상태일 때 뒤로가기 블락
ThirFir 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
27 changes: 27 additions & 0 deletions
27
core/data/src/main/kotlin/com/acon/core/data/di/DataStreamModule.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,27 @@ | ||
| package com.acon.core.data.di | ||
|
|
||
| import com.acon.core.data.stream.DataStream | ||
| import com.acon.core.data.stream.DataStreamImpl | ||
| import dagger.Binds | ||
| import dagger.Module | ||
| import dagger.hilt.InstallIn | ||
| import dagger.hilt.components.SingletonComponent | ||
| import javax.inject.Qualifier | ||
| import javax.inject.Singleton | ||
|
|
||
| @Module | ||
| @InstallIn(SingletonComponent::class) | ||
| abstract class DataStreamModule { | ||
|
|
||
| @Singleton | ||
| @Binds | ||
| @VerifiedArea | ||
| abstract fun bindsVerifiedAreaDataStream( | ||
| impl: DataStreamImpl | ||
| ) : DataStream | ||
|
|
||
| } | ||
|
|
||
| @Qualifier | ||
| @Retention(AnnotationRetention.BINARY) | ||
| annotation class VerifiedArea |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,14 +8,14 @@ import com.acon.acon.core.model.model.profile.ProfileImageStatus | |
| import com.acon.acon.core.model.model.profile.SavedSpot | ||
| import com.acon.acon.core.model.type.ImageType | ||
| import com.acon.acon.domain.error.area.DeleteVerifiedAreaError | ||
| import com.acon.acon.domain.error.area.ReplaceVerifiedArea | ||
| import com.acon.acon.domain.error.profile.UpdateProfileError | ||
| import com.acon.acon.domain.error.profile.ValidateNicknameError | ||
| import com.acon.acon.domain.repository.ProfileRepository | ||
| import com.acon.core.data.api.remote.noauth.FileUploadApi | ||
| import com.acon.core.data.stream.DataStream | ||
| import com.acon.core.data.datasource.local.ProfileLocalDataSource | ||
| import com.acon.core.data.datasource.remote.AconAppRemoteDataSource | ||
| import com.acon.core.data.datasource.remote.ProfileRemoteDataSource | ||
| import com.acon.core.data.di.VerifiedArea | ||
| import com.acon.core.data.dto.request.GetPresignedUrlRequest | ||
| import com.acon.core.data.dto.request.profile.toUpdateProfileRequest | ||
| import com.acon.core.data.error.runCatchingWith | ||
|
|
@@ -32,6 +32,7 @@ class ProfileRepositoryImpl @Inject constructor( | |
| private val profileRemoteDataSource: ProfileRemoteDataSource, | ||
| private val profileLocalDataSource: ProfileLocalDataSource, | ||
| private val aconAppRemoteDataSource: AconAppRemoteDataSource, | ||
| @VerifiedArea private val areaDataStream: DataStream, | ||
| @ApplicationContext private val context: Context | ||
| ) : ProfileRepository { | ||
|
|
||
|
|
@@ -122,17 +123,19 @@ class ProfileRepositoryImpl @Inject constructor( | |
| } | ||
| } | ||
|
|
||
| override suspend fun getVerifiedAreas(): Result<List<Area>> { | ||
| // TODO - 인증 지역 조회 API Error 처리 안됨 | ||
| return runCatchingWith() { | ||
| profileRemoteDataSource.getVerifiedAreas().verifiedAreaList | ||
| .map { it.toVerifiedArea() } | ||
| override fun getVerifiedAreas(): Flow<Result<List<Area>>> { | ||
| return areaDataStream.subscribe { | ||
| emit(runCatchingWith() { | ||
| profileRemoteDataSource.getVerifiedAreas().verifiedAreaList | ||
| .map { it.toVerifiedArea() } | ||
| }) | ||
| } | ||
|
Member
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. 여기서 DataStream을 이유는 무엇인가요?? (기존 앱 버전에서는 지역인증을 하고, 인증동네 확인 화면으로 돌아왔을 때, 바로 추가가 안되고 나갔다가 들어와야하는 문제가 있는거로 알고있는데 그거 때문인가요??)
Collaborator
Author
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. 네 그거 맞습니다. (위 코멘트와 같은 맥락) |
||
| } | ||
|
|
||
| override suspend fun deleteVerifiedArea(verifiedAreaId: Long): Result<Unit> { | ||
| return runCatchingWith(DeleteVerifiedAreaError()) { | ||
| profileRemoteDataSource.deleteVerifiedArea(verifiedAreaId) | ||
| areaDataStream.notifyDataChanged() | ||
| } | ||
| } | ||
| } | ||
| } | ||
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
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
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.
여기서 DataStream을 쓰는 이유는 무엇인가요??
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.
설정에서 새롭게 지역인증 -> 저장 api 호출해서 지역인증함 -> 이전화면으로 돌아옴
여기서 돌아왔을 때, notify를 해주지 않으면 이전화면에서 새로 저장된 지역이 있는지 알 수 없기 때문입니다