File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed
WordPress/Classes/ViewRelated/Stats/Period Stats/Countries Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ class CountriesCell: StatsBaseCell, NibLoadable {
2121 private typealias Style = WPStyleGuide . Stats
2222 private var forDetails = false
2323
24+ override func awakeFromNib( ) {
25+ super. awakeFromNib ( )
26+
27+ addDefaultTotalRows ( toStackView: rowsStackView)
28+ }
29+
2430 // MARK: - Configure
2531
2632 func configure( itemSubtitle: String ,
@@ -38,21 +44,27 @@ class CountriesCell: StatsBaseCell, NibLoadable {
3844 bottomSeparatorLine. isHidden = forDetails
3945
4046 if !forDetails {
41- addRows ( dataRows,
42- toStackView: rowsStackView,
47+ if rowsStackView. arrangedSubviews. isEmpty {
48+ addDefaultTotalRows ( toStackView: rowsStackView)
49+ }
50+ configureTotalRows (
51+ dataRows,
52+ inStackView: rowsStackView,
4353 forType: . period,
44- limitRowsDisplayed: true ,
45- viewMoreDelegate: self )
54+ configuration: . init(
55+ limitRowsDisplayed: true ,
56+ rowDelegate: nil ,
57+ referrerDelegate: nil ,
58+ viewMoreDelegate: self
59+ )
60+ )
61+ } else {
62+ removeRowsFromStackView ( rowsStackView)
4663 }
4764
4865 setSubtitleVisibility ( )
4966 applyStyles ( )
5067 }
51-
52- override func prepareForReuse( ) {
53- super. prepareForReuse ( )
54- removeRowsFromStackView ( rowsStackView)
55- }
5668}
5769
5870private extension CountriesCell {
You can’t perform that action at this time.
0 commit comments