feat(creator): 본인 채널 액션 기반을 추가한다
This commit is contained in:
@@ -20,6 +20,13 @@ struct CreatorChannelView: View {
|
||||
|
||||
private let titleBarHeight: CGFloat = 56
|
||||
private let tabBarHeight: CGFloat = 52
|
||||
|
||||
private var isOwnCreatorChannel: Bool {
|
||||
guard let creatorId = viewModel.response?.creator.creatorId else { return false }
|
||||
let userId = UserDefaults.int(forKey: .userId)
|
||||
guard userId > 0 else { return false }
|
||||
return creatorId == userId
|
||||
}
|
||||
|
||||
init(creatorId: Int, viewModel: CreatorChannelViewModel = CreatorChannelViewModel()) {
|
||||
self.creatorId = creatorId
|
||||
@@ -124,6 +131,7 @@ struct CreatorChannelView: View {
|
||||
isFollow: viewModel.response?.creator.isFollow ?? false,
|
||||
isNotify: viewModel.response?.creator.isNotify ?? false,
|
||||
backgroundProgress: backgroundProgress,
|
||||
showsCreatorActions: !isOwnCreatorChannel,
|
||||
onTapBack: {
|
||||
dismiss()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user