Skip to content

Commit

Permalink
Merge pull request #249 from GEON-PPANG/hotfix/#248
Browse files Browse the repository at this point in the history
[Hotfix] #248 - 하하 릴리즈하자마자 버그 발견 ^___^ 을 해결하기 위한 이슈
  • Loading branch information
seongmin221 authored Mar 28, 2024
2 parents 2ea76dc + ba219f6 commit 4825351
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ final class InfoCollectionViewCell: UICollectionViewCell {
openingHoursSection.addSubview(closedDaysLabel)
closedDaysLabel.snp.makeConstraints {
$0.leading.equalTo(openingHoursImage.snp.trailing).offset(10)
$0.trailing.equalToSuperview()
$0.top.equalToSuperview()
}
openingHoursSection.addSubview(openingHoursLabel)
openingHoursLabel.snp.makeConstraints {
$0.leading.equalTo(closedDaysLabel)
$0.horizontalEdges.equalTo(closedDaysLabel)
$0.top.equalTo(closedDaysLabel.snp.bottom).offset(2)
$0.bottom.equalToSuperview()
}
Expand Down Expand Up @@ -188,6 +189,7 @@ final class InfoCollectionViewCell: UICollectionViewCell {
if data.homepageURL == "" && data.instagramURL == "" {
linkSection.isHidden = true
} else {
linkSection.isHidden = false
linkButtonStackView.getLinkStatus(data.homepageURL, data.instagramURL)
}
addressLabel.text = data.address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ final class BakeryDetailViewController: BaseViewController {

// MARK: - Life Cycle

override func viewDidLoad() {
super.viewDidLoad()

guard let bakeryID = self.bakeryID else { return }
getBakeryDetail(bakeryID: bakeryID)
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

guard let bakeryID = self.bakeryID else { return }

getBakeryDetail(bakeryID: bakeryID, isUpdated: true)
getWrittenReviews(bakeryID: bakeryID, isUpdated: true)

navigationController?.interactivePopGestureRecognizer?.delegate = nil // swipe back gesture
}
Expand Down Expand Up @@ -414,7 +420,7 @@ extension BakeryDetailViewController: UICollectionViewDelegateFlowLayout {

extension BakeryDetailViewController {

func getBakeryDetail(bakeryID: Int, isUpdated: Bool) {
func getBakeryDetail(bakeryID: Int) {

BakeriesAPI.shared.getBakeryDetail(bakeryID: bakeryID) { response in

Expand All @@ -427,7 +433,6 @@ extension BakeryDetailViewController {
self.detailBottomView.configureBookmarkButton(to: data.isBookMarked)
self.homepageURL = data.homepageURL
self.instagramURL = data.instagramURL
self.getWrittenReviews(bakeryID: bakeryID, isUpdated: isUpdated)
}
}

Expand Down Expand Up @@ -455,7 +460,7 @@ extension BakeryDetailViewController {
AnalyticManager.log(event: .detail(.clickMystore))
self.detailBottomView.configureBookmarkButton(to: value)
self.isBookmarked = value
self.getBakeryDetail(bakeryID: bakeryID, isUpdated: false)
self.getBakeryDetail(bakeryID: bakeryID)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ final class EmptyCollectionViewCell: UICollectionViewCell {
emptyLabel.do {
$0.numberOfLines = 0
$0.basic(font: .title2!, color: .gbbGray300!, align: .center)
$0.textAlignment = .center
}
}

Expand All @@ -117,7 +116,8 @@ final class EmptyCollectionViewCell: UICollectionViewCell {
case .initialize, .noReview, .noMyReview, .noBookmark:
return emptyLabel.basic(text: emptyType.rawValue,
font: .title2!,
color: .gbbGray300!)
color: .gbbGray300!,
align: .center)
case .noSearch:
return emptyLabel.partFontChange(targetString: type.subTitle, font: .subHead!)
}
Expand Down

0 comments on commit 4825351

Please sign in to comment.