|
@ -9,7 +9,7 @@
|
|||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ic_thumb_play_blue.png",
|
||||
"filename" : "ic_alarm_clock_blue.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
SodaLive/Resources/Assets.xcassets/ic_alarm_clock_blue.imageset/ic_alarm_clock_blue.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.2 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_thumb_play_purple.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ic_thumb_play_purple.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
SodaLive/Resources/Assets.xcassets/ic_thumb_play_purple.imageset/ic_thumb_play_purple.png
vendored
Normal file
After Width: | Height: | Size: 3.5 KiB |
21
SodaLive/Resources/Assets.xcassets/img_bg_morning_call.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "img_bg_morning_call.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
SodaLive/Resources/Assets.xcassets/img_bg_morning_call.imageset/img_bg_morning_call.png
vendored
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -82,7 +82,7 @@ final class ContentRepository {
|
|||
return api.requestPublisher(
|
||||
.getNewContentOfTheme(
|
||||
theme: theme,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
|
||||
)
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ final class ContentRepository {
|
|||
func getCurationList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
|
||||
return api.requestPublisher(
|
||||
.getCurationList(
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
|
||||
page: page,
|
||||
size: size
|
||||
|
@ -115,7 +115,7 @@ final class ContentRepository {
|
|||
return api.requestPublisher(
|
||||
.getNewContentAllOfTheme(
|
||||
theme: theme,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
|
||||
page: page,
|
||||
size: size
|
||||
|
|
|
@ -40,6 +40,28 @@ struct ContentMainView: View {
|
|||
ContentMainRecommendSeriesView()
|
||||
|
||||
HStack(spacing: 8) {
|
||||
ZStack {
|
||||
Image("img_bg_morning_call")
|
||||
.resizable()
|
||||
.frame(height: 53.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.cornerRadius(2.6)
|
||||
|
||||
HStack(spacing: 2.7) {
|
||||
Image("ic_alarm_clock_blue")
|
||||
|
||||
Text("보이스 모닝콜")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "0057ff"))
|
||||
}
|
||||
.cornerRadius(2.6)
|
||||
}
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(
|
||||
step: .contentAllByTheme(themeId: 12)
|
||||
)
|
||||
}
|
||||
|
||||
ZStack {
|
||||
Image("img_bg_short_play")
|
||||
.resizable()
|
||||
|
@ -61,28 +83,6 @@ struct ContentMainView: View {
|
|||
step: .contentAllByTheme(themeId: 11)
|
||||
)
|
||||
}
|
||||
|
||||
ZStack {
|
||||
Image("img_bg_review_live")
|
||||
.resizable()
|
||||
.frame(height: 53.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.cornerRadius(2.6)
|
||||
|
||||
HStack(spacing: 2.7) {
|
||||
Image("ic_thumb_play_blue")
|
||||
|
||||
Text("라이브 다시듣기")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "0057ff"))
|
||||
}
|
||||
.cornerRadius(2.6)
|
||||
}
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(
|
||||
step: .contentAllByTheme(themeId: 7)
|
||||
)
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 40)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
|
|
@ -68,6 +68,11 @@ extension UserDefaults {
|
|||
return UserDefaults.standard.data(forKey: key)
|
||||
}
|
||||
|
||||
static func isAdultContentVisible() -> Bool {
|
||||
let key = UserDefaultsKey.isAdultContentVisible.rawValue
|
||||
return UserDefaults.standard.object(forKey: key) != nil ? bool(forKey: .isAdultContentVisible) : true
|
||||
}
|
||||
|
||||
static func reset() {
|
||||
UserDefaultsKey.allCases.forEach { UserDefaults.standard.removeObject(forKey: $0.rawValue) }
|
||||
}
|
||||
|
|
|
@ -26,6 +26,29 @@ struct LiveView: View {
|
|||
.padding(.top, 13.3)
|
||||
}
|
||||
|
||||
ZStack {
|
||||
Image("img_bg_review_live")
|
||||
.resizable()
|
||||
.frame(height: 53.3)
|
||||
.frame(maxWidth: .infinity)
|
||||
.cornerRadius(2.6)
|
||||
|
||||
HStack(spacing: 2.7) {
|
||||
Image("ic_thumb_play_purple")
|
||||
|
||||
Text("라이브 다시듣기")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "672bff"))
|
||||
}
|
||||
.cornerRadius(2.6)
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(
|
||||
step: .contentAllByTheme(themeId: 7)
|
||||
)
|
||||
}
|
||||
|
||||
if viewModel.recommendChannelItems.count > 0 {
|
||||
SectionRecommendChannelView(
|
||||
items: viewModel.isFollowingList ?
|
||||
|
|
|
@ -99,7 +99,7 @@ final class LiveViewModel: ObservableObject {
|
|||
timezone: TimeZone.current.identifier,
|
||||
dateString: nil,
|
||||
status: .NOW,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
page: 1,
|
||||
size: 10
|
||||
)
|
||||
|
@ -110,7 +110,7 @@ final class LiveViewModel: ObservableObject {
|
|||
timezone: TimeZone.current.identifier,
|
||||
dateString: nil,
|
||||
status: .RESERVATION,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
page: 1,
|
||||
size: 10
|
||||
)
|
||||
|
@ -289,7 +289,7 @@ final class LiveViewModel: ObservableObject {
|
|||
timezone: TimeZone.current.identifier,
|
||||
dateString: nil,
|
||||
status: .NOW,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
page: page,
|
||||
size: pageSize
|
||||
)
|
||||
|
@ -347,7 +347,7 @@ final class LiveViewModel: ObservableObject {
|
|||
timezone: TimeZone.current.identifier,
|
||||
dateString: selectedDateString,
|
||||
status: .RESERVATION,
|
||||
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
page: page,
|
||||
size: pageSize
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import Foundation
|
||||
|
||||
final class ContentSettingsViewModel: ObservableObject {
|
||||
@Published var isAdultContentVisible = UserDefaults.bool(forKey: .isAdultContentVisible) {
|
||||
@Published var isAdultContentVisible = UserDefaults.isAdultContentVisible() {
|
||||
didSet {
|
||||
if oldValue != isAdultContentVisible {
|
||||
UserDefaults.set(isAdultContentVisible, forKey: .isAdultContentVisible)
|
||||
|
|