유료 콘텐츠 미리 듣기 재생 버튼 추가
This commit is contained in:
parent
962197d319
commit
47ae2ec8e1
21
SodaLive/Resources/Assets.xcassets/btn_audio_content_preview_play.imageset/Contents.json
vendored
Normal file
21
SodaLive/Resources/Assets.xcassets/btn_audio_content_preview_play.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "btn_audio_content_preview_play.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -12,6 +12,7 @@ import Sliders
|
|||
struct ContentDetailPlayView: View {
|
||||
|
||||
let audioContent: GetAudioContentDetailResponse
|
||||
let isAlertPreview: Bool
|
||||
@Binding var isShowPreviewAlert: Bool
|
||||
|
||||
@StateObject var contentPlayManager = ContentPlayManager.shared
|
||||
|
@ -34,7 +35,7 @@ struct ContentDetailPlayView: View {
|
|||
)
|
||||
.cornerRadius(10.7, corners: [.topLeft, .topRight])
|
||||
|
||||
Image(isPlaying() ? "btn_audio_content_pause" : "btn_audio_content_play")
|
||||
Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play")
|
||||
.onTapGesture {
|
||||
if isPlaying() {
|
||||
contentPlayManager.pauseAudio()
|
||||
|
|
|
@ -69,6 +69,7 @@ struct ContentDetailView: View {
|
|||
VStack(spacing: 0) {
|
||||
ContentDetailPlayView(
|
||||
audioContent: audioContent,
|
||||
isAlertPreview: audioContent.price > 0 && !audioContent.existOrdered && audioContent.orderType == nil && audioContent.creator.creatorId != UserDefaults.int(forKey: .userId),
|
||||
isShowPreviewAlert: $viewModel.isShowPreviewAlert
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue