Skip to content

Commit

Permalink
검색 목록 좋아요 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
yeseoRyu committed Jan 21, 2025
1 parent 3f026ad commit a2678a1
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class PhotoViewModel @Inject constructor(
pagingSourceFactory = { PhotoPagingSource(photos) }
).flow
}
.cachedIn(viewModelScope) // 여기
.combine(savedPhotos) { pagingData, savedPhotos ->
pagingData.map { photo ->
val savedPhoto = savedPhotos.find { it.id == photo.id }
Expand All @@ -63,8 +64,6 @@ class PhotoViewModel @Inject constructor(
}
}
}
.cachedIn(viewModelScope)


/* Bookmark */
private val _isLiked = MutableLiveData<Boolean>()
Expand Down Expand Up @@ -109,7 +108,6 @@ class PhotoViewModel @Inject constructor(
}?.awaitAll()?.filterNotNull() ?: emptyList()
} catch (e: Exception) {
e.printStackTrace()

emptyList()
}
}
Expand Down

0 comments on commit a2678a1

Please sign in to comment.