Skip to content

Commit

Permalink
feat: #76-이미 quote가 저장되어 있으면 바로 선택
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunJaeyeon committed Nov 28, 2024
1 parent 3cff9aa commit 60053c9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ struct AnimeSelectView: View {
// 애니 선택 및 데이터 로드
@MainActor
private func selectAnime(_ anime: Anime) async {
// quotes가 이미 저장되어 있으면 바로 선택
if !anime.quotes.isEmpty {
viewModel.selectAnime(anime)
return
}

isLoading = true
do {
try await firestoreService.fetchAnimeDetailsAndStore(context: modelContext, animeID: anime.id) // modelContext 전달
Expand Down

0 comments on commit 60053c9

Please sign in to comment.