File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
WooCommerce/Classes/ViewRelated/Orders Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ final class OrderTrackingTableViewCell: UITableViewCell {
88 @IBOutlet private var bottomLine : UILabel !
99 @IBOutlet private var topBorder : UIView !
1010 @IBOutlet private var actionButton : UIButton !
11+ @IBOutlet private var internalSeparator : UIView !
1112
1213 var onActionTouchUp : ( ( ) -> Void ) ?
1314
@@ -51,6 +52,16 @@ final class OrderTrackingTableViewCell: UITableViewCell {
5152 }
5253 }
5354
55+ func showActionButton( ) {
56+ actionButton. isHidden = false
57+ internalSeparator. isHidden = false
58+ }
59+
60+ func hideActionButton( ) {
61+ actionButton. isHidden = true
62+ internalSeparator. isHidden = true
63+ }
64+
5465 override func awakeFromNib( ) {
5566 super. awakeFromNib ( )
5667 configureButtonSeparator ( )
Original file line number Diff line number Diff line change 7878 <connections >
7979 <outlet property =" actionButton" destination =" q04-tu-Hwj" id =" yfI-P3-JyX" />
8080 <outlet property =" bottomLine" destination =" QPn-Oj-khc" id =" TQ5-DT-vlI" />
81+ <outlet property =" internalSeparator" destination =" Mav-Sc-Nqa" id =" Tu8-Dw-dRl" />
8182 <outlet property =" middleLine" destination =" 5Tp-fv-Tte" id =" 0Kp-r9-HEk" />
8283 <outlet property =" topBorder" destination =" Mav-Sc-Nqa" id =" fen-Nr-OeV" />
8384 <outlet property =" topLine" destination =" kb4-pd-pEb" id =" eC2-Xc-JAH" />
Original file line number Diff line number Diff line change @@ -547,6 +547,12 @@ private extension OrderDetailsViewController {
547547 " This is where the shipping date would normally display. " )
548548 }
549549
550+ guard let url = tracking. trackingURL, url. isEmpty == false else {
551+ cell. hideActionButton ( )
552+ return
553+ }
554+
555+ cell. showActionButton ( )
550556 cell. actionButtonNormalText = viewModel. trackTitle
551557
552558 cell. onActionTouchUp = { [ weak self ] in
You can’t perform that action at this time.
0 commit comments