Skip to content

Commit

Permalink
Fix not load image event
Browse files Browse the repository at this point in the history
  • Loading branch information
matax87 committed Dec 4, 2024
1 parent 964558c commit 6866db9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ class EventDetailsViewController: UIViewController {
private extension EventDetailsViewController {
func configureViewHierarchy() {
var contentConfiguration = EventCardContentConfiguration.makeDetailedContentConfiguration(for: event)
defer {
_cardView = contentConfiguration.makeContentView()
contentStackView.insertArrangedSubview(_cardView, at: 0)
}
_cardView = contentConfiguration.makeContentView()

if let imageURL = event.imageURL {
KingfisherManager.shared.retrieveImage(with: imageURL) { [weak _cardView] result in
Expand All @@ -152,6 +149,8 @@ private extension EventDetailsViewController {
} else {
addToCalendarButton.removeFromSuperview()
}

contentStackView.insertArrangedSubview(_cardView, at: 0)
}

@IBAction func findOnMapsAction(sender: Any?) {
Expand Down

0 comments on commit 6866db9

Please sign in to comment.