@@ -142,16 +142,14 @@ private extension SettingsViewController {
142142 #endif
143143
144144 if couldShowBetaFeaturesRow ( ) {
145- rowsForImproveTheAppSection { [ weak self] improveTheAppRows in
146- self ? . sections = [
147- Section ( title: selectedStoreTitle, rows: storeRows, footerHeight: CGFloat . leastNonzeroMagnitude) ,
148- Section ( title: nil , rows: [ . support] , footerHeight: UITableView . automaticDimension) ,
149- Section ( title: improveTheAppTitle, rows: improveTheAppRows, footerHeight: UITableView . automaticDimension) ,
150- Section ( title: aboutSettingsTitle, rows: [ . about, . licenses] , footerHeight: UITableView . automaticDimension) ,
151- otherSection,
152- Section ( title: nil , rows: [ . logout] , footerHeight: CGFloat . leastNonzeroMagnitude)
153- ]
154- }
145+ sections = [
146+ Section ( title: selectedStoreTitle, rows: storeRows, footerHeight: CGFloat . leastNonzeroMagnitude) ,
147+ Section ( title: nil , rows: [ . support] , footerHeight: UITableView . automaticDimension) ,
148+ Section ( title: improveTheAppTitle, rows: [ . privacy, . betaFeatures, . featureRequest] , footerHeight: UITableView . automaticDimension) ,
149+ Section ( title: aboutSettingsTitle, rows: [ . about, . licenses] , footerHeight: UITableView . automaticDimension) ,
150+ otherSection,
151+ Section ( title: nil , rows: [ . logout] , footerHeight: CGFloat . leastNonzeroMagnitude)
152+ ]
155153 } else {
156154 sections = [
157155 Section ( title: selectedStoreTitle, rows: storeRows, footerHeight: CGFloat . leastNonzeroMagnitude) ,
@@ -164,26 +162,6 @@ private extension SettingsViewController {
164162 }
165163 }
166164
167- func rowsForImproveTheAppSection( onCompletion: @escaping ( _ rows: [ Row ] ) -> Void ) {
168- if ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . productList) {
169- onCompletion ( [ . privacy, . betaFeatures, . featureRequest] )
170- return
171- }
172-
173- guard let siteID = ServiceLocator . stores. sessionManager. defaultStoreID else {
174- assertionFailure ( " Cannot find store ID " )
175- return
176- }
177- let action = AppSettingsAction . loadStatsVersionEligible ( siteID: siteID) { eligibleStatsVersion in
178- guard eligibleStatsVersion == . v4 else {
179- onCompletion ( [ . privacy, . featureRequest] )
180- return
181- }
182- onCompletion ( [ . privacy, . betaFeatures, . featureRequest] )
183- }
184- ServiceLocator . stores. dispatch ( action)
185- }
186-
187165 func registerTableViewCells( ) {
188166 for row in Row . allCases {
189167 tableView. register ( row. type. loadNib ( ) , forCellReuseIdentifier: row. reuseIdentifier)
0 commit comments