feat: 최근 들은 콘텐츠 로컬 DB 추가
This commit is contained in:
@@ -16,6 +16,7 @@ struct ContentDetailPlayView: View {
|
||||
@Binding var isShowPreviewAlert: Bool
|
||||
|
||||
@StateObject var contentPlayManager = ContentPlayManager.shared
|
||||
@StateObject var recentContentViewModel = RecentContentViewModel()
|
||||
|
||||
@State private var isRepeat = UserDefaults.bool(forKey: .isContentPlayLoop)
|
||||
@State private var isEditing = false
|
||||
@@ -101,6 +102,13 @@ struct ContentDetailPlayView: View {
|
||||
isPreview: !audioContent.existOrdered && audioContent.price > 0
|
||||
)
|
||||
isShowPreviewAlert = true
|
||||
|
||||
recentContentViewModel.insertRecentContent(
|
||||
contentId: Int64(audioContent.contentId),
|
||||
coverImageUrl: audioContent.coverImageUrl,
|
||||
title: audioContent.title,
|
||||
creatorNickname: audioContent.creator.nickname
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user