Skip to content

Commit f76335f

Browse files
committed
Updated comment for why we need the empty view at the second-to-last index
1 parent 5d39ee5 commit f76335f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Stats v4/StoreStatsV4PeriodViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ private extension StoreStatsV4PeriodViewController {
279279
timeRangeBarView.backgroundColor = .systemColor(.secondarySystemGroupedBackground)
280280
visitorsStackView.backgroundColor = .systemColor(.secondarySystemGroupedBackground)
281281

282-
// Visitor empty view - insert it at the second-to-last index
282+
// Visitor empty view - insert it at the second-to-last index,
283+
// since we need the footer view (with height = 20) as the last item in the stack view.
283284
let emptyViewIndex = max(0, visitorsStackView.arrangedSubviews.count - 2)
284285
visitorsStackView.insertArrangedSubview(visitorsEmptyView, at: emptyViewIndex)
285286
visitorsEmptyView.isHidden = true

0 commit comments

Comments
 (0)