Skip to content

Commit

Permalink
[Delete] sopt-makers#336 - 눈 모양 아이콘과 답장 메시지 타입 개념 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj8706 committed Dec 24, 2023
1 parent 7ffdd7a commit e541698
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ public final class PokeKokButton: UIButton {

// MARK: - Properties

public var isFriend: Bool {
didSet {
setIcon()
}
}

public lazy var tap: Driver<Void> = self.publisher(for: .touchUpInside)
.mapVoid()
.asDriver()
Expand All @@ -37,8 +31,7 @@ public final class PokeKokButton: UIButton {

// MARK: - initialization

public init(isFriend: Bool = true) {
self.isFriend = isFriend
public init() {
super.init(frame: .zero)
self.setUI()
}
Expand All @@ -60,12 +53,8 @@ public final class PokeKokButton: UIButton {
self.backgroundColor = backgroundColor
}

public func setIsFriend(with isFriend: Bool) {
self.isFriend = isFriend
}

private func setIcon() {
let icon = self.isFriend ? DSKitAsset.Assets.iconKok.image : DSKitAsset.Assets.iconEyes.image
let icon = DSKitAsset.Assets.iconKok.image
self.setImage(icon.withTintColor(DSKitAsset.Colors.black.color), for: .normal)
self.setImage(icon.withTintColor(DSKitAsset.Colors.gray500.color), for: .disabled)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ extension PokeNotificationListContentView {
self.descriptionLabel.attributedText = model.description.applyMDSFont()
self.pokeChipView.configure(with: model.chipInfo)
self.pokeKokButton.isEnabled = !model.isPoked
self.pokeKokButton.setIsFriend(with: !model.isFirstMeet)
}

public func configure(with model: PokeUserModel) {
Expand All @@ -169,7 +168,6 @@ extension PokeNotificationListContentView {
self.descriptionLabel.attributedText = model.message.applyMDSFont()
self.pokeChipView.configure(with: model.makeChipInfo())
self.pokeKokButton.isEnabled = !model.isAlreadyPoke
self.pokeKokButton.setIsFriend(with: !model.isFirstMeet)
}

func setData(with model: PokeUserModel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public final class PokeProfileCardView: UIView, PokeCompatible {
self.nameLabel.text = model.name
self.partLabel.text = String(describing: model.generation) + "" + " " + model.part
self.kokButton.isEnabled = !model.isAlreadyPoke
self.kokButton.setIsFriend(with: !model.isFirstMeet)
}

@discardableResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ public final class PokeProfileListView: UIView, PokeCompatible {
self.dividerView.backgroundColor = color
return self
}

@discardableResult
func setIsFriend(to isFriend: Bool) -> Self {
self.kokButton.isFriend = isFriend
return self
}
}

extension PokeProfileListView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class PokeCoordinator: DefaultCoordinator {

pokeMain.vm.onPokeButtonTapped = { [weak self] userModel in
guard let self else { return .empty() }
return self.showMessageBottomSheet(userModel: userModel, isReplyToNewPerson: false, on: pokeMain.vc.viewController)
return self.showMessageBottomSheet(userModel: userModel, on: pokeMain.vc.viewController)
}

rootController = pokeMain.vc.asNavigationController
Expand Down Expand Up @@ -92,12 +92,9 @@ final class PokeCoordinator: DefaultCoordinator {
pokeMyFriendsCoordinator.start()
}

private func showMessageBottomSheet(userModel: PokeUserModel, isReplyToNewPerson: Bool, on view: UIViewController?) -> AnyPublisher<(PokeUserModel, PokeMessageModel), Never> {
private func showMessageBottomSheet(userModel: PokeUserModel, on view: UIViewController?) -> AnyPublisher<(PokeUserModel, PokeMessageModel), Never> {
var messageType: PokeMessageType = userModel.isFirstMeet ? .pokeSomeone : .pokeFriend
if isReplyToNewPerson {
messageType = .replyNew
}


guard let bottomSheet = self.factory
.makePokeMessageTemplateBottomSheet(messageType: messageType)
.vc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ extension PokeUserModel {

return .withPokeCount(relation: model.relationName, pokeCount: String(model.pokeNum))
}

}

0 comments on commit e541698

Please sign in to comment.