Skip to content

Commit 745b798

Browse files
authored
Merge pull request #186 from YAPP-Github/fix/#161-album-detail-favorite-result
[fix] #161 앨범 상세 즐겨찾기 변경 후 Archive 갱신 누락 수정
2 parents 4d23ae7 + 0eafa79 commit 745b798

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

feature/archive/impl/src/main/kotlin/com/neki/android/feature/archive/impl/album_detail/AlbumDetailViewModel.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ class AlbumDetailViewModel @AssistedInject constructor(
155155
updatedFavorites.update { it + (photo.id to newFavorite) }
156156
viewModelScope.launch {
157157
photoRepository.updateFavorite(photo.id, newFavorite)
158+
.onSuccess {
159+
postSideEffect(AlbumDetailSideEffect.NotifyResult)
160+
}
158161
.onFailure { e ->
159162
Timber.e(e)
160163
updatedFavorites.update { it + (photo.id to photo.isFavorite) }

0 commit comments

Comments
 (0)