-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] #55 #56 사진 즐겨찾기, 사진 API 수정사항 반영 #58
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 all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
29884f9
[feat] 즐겨찾기 업데이트 API 구현 #55
ikseong00 02cc305
[feat] 즐겨찾기 사진 조회 API 구현 #55
ikseong00 4916300
[feat] 즐겨찾기 요약 조회 API 구현 #55
ikseong00 93589f2
[feat] 즐겨찾기 업데이트 실패 시 상태 복원 기능 추가 #56
ikseong00 32278dd
[refactor] #55: 앨범 상세화면 State에서 Album 모델 의존성 제거
ikseong00 7834ad2
[feat] #55: 즐겨찾기 앨범 사진 목록을 가져오는 기능 추가
ikseong00 0591179
[refactor] #55: FavoriteSummary를 AlbumPreview로 대체
ikseong00 3072d69
[refactor] #55: 아카이브 화면에서 Album 모델을 AlbumPreview로 변경 및 즐겨찾기 폴더 데이터 가져…
ikseong00 cbe0140
[fix] #55: 사진 상세화면 즐겨찾기 API 중복 호출 수정
ikseong00 8f3bfef
[refactor] #55: 아카이브 메인 화면 데이터 로딩 병렬 처리
ikseong00 94a947d
[fix] #55: 즐겨찾기 목록 할당하는 변수 수정
ikseong00 99bad56
[fix] #56: 보관함 사진 아이템 좌우 패딩 추가
ikseong00 6001722
[chore] #55: 더미 앨범 데이터 및 미사용 import 제거
ikseong00 a7ef58f
[feat] 사진 등록 API 수정 #56
ikseong00 e0ac8d0
[feat] 사진 삭제 API 수정 #56
ikseong00 238ff58
[feat] 사진 조회 API 수정 #56
ikseong00 3433f76
[refactor] #56: 단일 사진만 삭제하는 함수 추가
ikseong00 e00e3f2
[chore] #56: 사용하지 않는 import 문 제거
ikseong00 9c5c3e8
[feat] #56: 사진 데이터 없을 때 엠티 뷰 추가
ikseong00 38d3ab8
[refactor] #56: 즐겨찾기 사진 조회 시 favorite 속성 부여하지 않는 오류 수정
ikseong00 ba1fb87
[fix] #56: 사진 상세 화면에서 즐겨찾기 상태 복구 로직 수정
ikseong00 b2023f4
[feat] #56: 사진 상세 화면에서 변경 시 아카이브 메인 화면 갱신
ikseong00 5536904
[feat] #56: 아카이빙 메인 즐겨찾는 앨범 기본 제목 설정
ikseong00 a78a834
[refactor] #56: 로딩 상태가 항상 false로 설정되도록 finally 블록 추가
ikseong00 52bd128
[feat] #56: ApplicationScope를 갖는 CoroutineScope 추가
ikseong00 5f28e1a
[refactor] #56: ViewModel 스코프를 applicationScope로 변경하여 생명주기 확장
ikseong00 628b639
[refactor] #56: ViewModel에서 SideEffect를 직접 호출하지 못하도록 수정
ikseong00 ff9856d
[refactor] #56: 미디어 업로드 API 응답 모델 변경
ikseong00 090cfec
[feat] #55: 중복 발행을 막는 `allowDuplicate` 옵션 ResultEventBus에 추가
ikseong00 6aef0c6
[refactor] #56: 아카이브 메인 화면 레이아웃 구조 개선
ikseong00 a4fd408
[fix] #56: 보관함 이미지 추가 시 로딩 상태가 계속 유지되는 버그 수정
ikseong00 87133c3
[feat] #55: 즐겨찾는사진 앨범 사진 삭제 로직 구현
ikseong00 0403697
[refactor] #55: 포토카드 즐겨찾기 상태 관리 로직 개선
ikseong00 f64157a
[refactor] #55: PhotoDetail의 favoriteRequests를 ViewModel로 이동
ikseong00 990e2b9
[refactor] #55: PhotoDetailViewModel의 favoriteRequests 가시성 변경 및 리팩토링
ikseong00 6e291f0
[refactor] #55: 포토카드 상세화면의 초기 좋아요 상태를 photo.isFavorite로 설정
ikseong00 eba3da4
Merge branch 'develop' into feat/#55,#56-photo-api
ikseong00 44941f7
[fix] #55: 앨범 상세화면 로딩 중 빈 화면이 표시되는 버그 수정
ikseong00 ec0ea59
[refactor] #55: ApplicationScope 대신 ViewModelScope 에서 좋아요 상태 구독
ikseong00 bf290fa
[refactor] #55: ViewModel이 onCleared 시점에 좋아요 상태를 업데이트하도록 변경
ikseong00 62b596e
[chore] 사용하지 않는 import 제거
ikseong00 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
26 changes: 26 additions & 0 deletions
26
core/common/src/main/java/com/neki/android/core/common/coroutine/di/CoroutineScopeModule.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,26 @@ | ||
| package com.neki.android.core.common.coroutine.di | ||
|
|
||
| import dagger.Module | ||
| import dagger.Provides | ||
| import dagger.hilt.InstallIn | ||
| import dagger.hilt.components.SingletonComponent | ||
| import kotlinx.coroutines.CoroutineScope | ||
| import kotlinx.coroutines.Dispatchers | ||
| import kotlinx.coroutines.SupervisorJob | ||
| import javax.inject.Qualifier | ||
| import javax.inject.Singleton | ||
|
|
||
| @Qualifier | ||
| @Retention(AnnotationRetention.RUNTIME) | ||
| annotation class ApplicationScope | ||
|
|
||
| @Module | ||
| @InstallIn(SingletonComponent::class) | ||
| object CoroutineScopeModule { | ||
|
|
||
| @Provides | ||
| @Singleton | ||
| @ApplicationScope | ||
| fun provideApplicationScope(): CoroutineScope = | ||
| CoroutineScope(SupervisorJob() + Dispatchers.Default) | ||
| } |
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
9 changes: 9 additions & 0 deletions
9
.../data/src/main/java/com/neki/android/core/data/remote/model/request/DeletePhotoRequest.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,9 @@ | ||
| package com.neki.android.core.data.remote.model.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class DeletePhotoRequest( | ||
| @SerialName("photoIds") val photoIds: List<Long>, | ||
| ) |
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
9 changes: 9 additions & 0 deletions
9
...ta/src/main/java/com/neki/android/core/data/remote/model/request/UpdateFavoriteRequest.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,9 @@ | ||
| package com.neki.android.core.data.remote.model.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class UpdateFavoriteRequest( | ||
| @SerialName("favorite") val favorite: Boolean, | ||
| ) |
31 changes: 31 additions & 0 deletions
31
...a/src/main/java/com/neki/android/core/data/remote/model/response/FavoritePhotoResponse.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,31 @@ | ||
| package com.neki.android.core.data.remote.model.response | ||
|
|
||
| import com.neki.android.core.common.util.toFormattedDate | ||
| import com.neki.android.core.model.Photo | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class FavoritePhotoResponse( | ||
| @SerialName("hasNext") val hasNext: Boolean, | ||
| @SerialName("items") val items: List<Item>, | ||
| ) { | ||
| @Serializable | ||
| data class Item( | ||
| @SerialName("contentType") val contentType: String, | ||
| @SerialName("createdAt") val createdAt: String, | ||
| @SerialName("favorite") val favorite: Boolean, | ||
| @SerialName("folderId") val folderId: Long?, | ||
| @SerialName("imageUrl") val imageUrl: String, | ||
| @SerialName("photoId") val photoId: Long, | ||
| ) { | ||
| internal fun toModel() = Photo( | ||
| id = photoId, | ||
| imageUrl = imageUrl, | ||
| isFavorite = favorite, | ||
| date = createdAt.toFormattedDate(), | ||
| ) | ||
| } | ||
|
|
||
| fun toModels() = items.map { it.toModel() } | ||
| } | ||
18 changes: 18 additions & 0 deletions
18
...src/main/java/com/neki/android/core/data/remote/model/response/FavoriteSummaryResponse.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,18 @@ | ||
| package com.neki.android.core.data.remote.model.response | ||
|
|
||
| import com.neki.android.core.model.AlbumPreview | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class FavoriteSummaryResponse( | ||
| @SerialName("latestImageUrl") val latestImageUrl: String?, | ||
| @SerialName("totalCount") val totalCount: Int, | ||
| ) { | ||
| fun toModel() = AlbumPreview( | ||
| id = -1L, | ||
| title = "즐겨찾는사진", | ||
| thumbnailUrl = latestImageUrl, | ||
| photoCount = totalCount, | ||
| ) | ||
|
Comment on lines
+12
to
+17
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. 문자열 하드코딩으로 i18n 이슈 가능
🤖 Prompt for AI Agents |
||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.