File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
WooCommerce/Classes/ViewRelated/Orders/OrderDetails Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ class OrderDetailsViewController: UIViewController {
2222 }
2323 }
2424
25- private var billingIsHidden = true
25+ private var billingIsHidden = true {
26+ didSet {
27+ reloadSections ( )
28+ }
29+ }
2630 private var sections = [ Section] ( ) {
2731 didSet {
2832 guard isViewLoaded else {
@@ -256,7 +260,7 @@ extension OrderDetailsViewController {
256260 sendEmailIfPossible ( )
257261 }
258262
259- func setShowHideFooter ( ) {
263+ func toggleBillingFooter ( ) {
260264 billingIsHidden = !billingIsHidden
261265 }
262266}
@@ -320,10 +324,13 @@ extension OrderDetailsViewController: UITableViewDataSource {
320324 let image = billingIsHidden ? Gridicon . iconOfType ( . chevronDown) : Gridicon . iconOfType ( . chevronUp)
321325 cell. configure ( text: footerText, image: image)
322326 cell. didSelectFooter = { [ weak self] in
323- self ? . setShowHideFooter ( )
324- self ? . configureTableView ( )
327+ guard let `self` = self else {
328+ return
329+ }
330+
325331 let sections = IndexSet ( integer: section)
326- tableView. reloadSections ( sections, with: . fade)
332+ self . toggleBillingFooter ( )
333+ self . tableView. reloadSections ( sections, with: . fade)
327334 }
328335
329336 return cell
You can’t perform that action at this time.
0 commit comments