parent
4a552dabe2
commit
1d3350d498
|
@ -40,6 +40,8 @@ struct ContentMainBannerView: View {
|
||||||
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
|
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
|
||||||
case .CREATOR:
|
case .CREATOR:
|
||||||
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
|
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
|
||||||
|
case .SERIES:
|
||||||
|
AppState.shared.setAppStep(step: .seriesDetail(seriesId: item.seriesId!))
|
||||||
case .LINK:
|
case .LINK:
|
||||||
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
|
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
|
||||||
UIApplication.shared.open(url)
|
UIApplication.shared.open(url)
|
||||||
|
@ -68,6 +70,8 @@ struct ContentMainBannerView: View {
|
||||||
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
|
AppState.shared.setAppStep(step: .eventDetail(event: item.eventItem!))
|
||||||
case .CREATOR:
|
case .CREATOR:
|
||||||
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
|
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId!))
|
||||||
|
case .SERIES:
|
||||||
|
AppState.shared.setAppStep(step: .seriesDetail(seriesId: item.seriesId!))
|
||||||
case .LINK:
|
case .LINK:
|
||||||
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
|
if let link = item.link, link.trimmingCharacters(in: .whitespaces).count > 0, let url = URL(string: link), UIApplication.shared.canOpenURL(url) {
|
||||||
UIApplication.shared.open(url)
|
UIApplication.shared.open(url)
|
||||||
|
|
|
@ -64,9 +64,10 @@ struct GetAudioContentBannerResponse: Decodable {
|
||||||
let thumbnailImageUrl: String
|
let thumbnailImageUrl: String
|
||||||
let eventItem: EventItem?
|
let eventItem: EventItem?
|
||||||
let creatorId: Int?
|
let creatorId: Int?
|
||||||
|
let seriesId: Int?
|
||||||
let link: String?
|
let link: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
enum AudioContentBannerType: String, Decodable {
|
enum AudioContentBannerType: String, Decodable {
|
||||||
case EVENT, CREATOR, LINK
|
case EVENT, CREATOR, LINK, SERIES
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue