Skip to content

Commit 3bf88cf

Browse files
committed
EmptyStateVC: Use alias in configure() to avoid using self
1 parent 94ffb43 commit 3bf88cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

WooCommerce/Classes/ViewRelated/ReusableViews/EmptyStateViewController/EmptyStateViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ final class EmptyStateViewController: UIViewController, KeyboardFrameAdjustmentP
119119
func configure(message: NSAttributedString? = nil,
120120
image: UIImage? = nil,
121121
details: String? = nil,
122-
actionButton: ActionButtonConfig? = nil) {
122+
actionButton actionButtonConfig: ActionButtonConfig? = nil) {
123123
messageLabel.attributedText = message
124124
messageLabel.isHidden = message == nil
125125

@@ -129,9 +129,9 @@ final class EmptyStateViewController: UIViewController, KeyboardFrameAdjustmentP
129129
detailsLabel.text = details
130130
detailsLabel.isHidden = details == nil
131131

132-
lastActionButtonConfig = actionButton
133-
self.actionButton.setTitle(actionButton?.title, for: .normal)
134-
self.actionButton.isHidden = actionButton == nil
132+
lastActionButtonConfig = actionButtonConfig
133+
actionButton.setTitle(actionButtonConfig?.title, for: .normal)
134+
actionButton.isHidden = actionButtonConfig == nil
135135
}
136136

137137
/// Watch for device orientation changes and update the `imageView`'s visibility accordingly.

0 commit comments

Comments
 (0)