팔로잉/팔로워 리스트 - 팔로우와 알림설정
- 팔로잉 상태에서 알림 켜기/끄기 상태 추가
This commit is contained in:
@@ -12,9 +12,7 @@ struct FollowCreatorItemView: View {
|
||||
|
||||
let creator: GetCreatorFollowingAllListItem
|
||||
let onClickFollow: (Int) -> Void
|
||||
let onClickUnFollow: (Int) -> Void
|
||||
|
||||
@State private var isFollow = true
|
||||
let showCreatorFollowNotifyDialog: (Int) -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 13.3) {
|
||||
@@ -26,29 +24,30 @@ struct FollowCreatorItemView: View {
|
||||
|
||||
Text(creator.nickname)
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.leading, 13.3)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(isFollow ? "btn_following_big" : "btn_follow_big")
|
||||
.onTapGesture {
|
||||
if isFollow {
|
||||
onClickUnFollow(creator.creatorId)
|
||||
} else {
|
||||
onClickFollow(creator.creatorId)
|
||||
}
|
||||
|
||||
isFollow = !isFollow
|
||||
Image(
|
||||
creator.isFollow ?
|
||||
creator.isNotify ?
|
||||
"btn_following_big" :
|
||||
"btn_following_no_alarm_big" :
|
||||
"btn_follow_big"
|
||||
)
|
||||
.onTapGesture {
|
||||
if creator.isFollow {
|
||||
showCreatorFollowNotifyDialog(creator.creatorId)
|
||||
} else {
|
||||
onClickFollow(creator.creatorId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle()
|
||||
.foregroundColor(Color(hex: "595959"))
|
||||
.foregroundColor(Color.gray59)
|
||||
.frame(height: 0.5)
|
||||
}
|
||||
.onAppear {
|
||||
isFollow = creator.isFollow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user