Refine feedback eligiblity

- Always show "Join community" in Organizer
- Always show "FAQ" above "Report connectivity issue"
This commit is contained in:
Davide De Rosa 2019-11-19 23:53:10 +01:00
parent 8f3d69fc4c
commit ad9f1b625d
2 changed files with 15 additions and 8 deletions

View File

@ -56,9 +56,7 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
model.add(.siri)
}
model.add(.support)
if ProductManager.shared.isEligibleForFeedback() {
model.add(.feedback)
}
model.add(.about)
model.add(.destruction)
model.setHeader(L10n.App.Service.Sections.Vpn.header, forSection: .vpn)
@ -75,7 +73,13 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
model.setHeader(L10n.Core.Organizer.Sections.Feedback.header, forSection: .feedback)
model.set([.connectionStatus], forSection: .vpn)
model.set([.donate, .translate], forSection: .support)
model.set([.joinCommunity, .writeReview], forSection: .feedback)
var feedbackRows: [RowType] = [.joinCommunity]
if ProductManager.shared.isEligibleForFeedback() {
feedbackRows.append(.writeReview)
}
model.set(feedbackRows, forSection: .feedback)
model.set([.openAbout], forSection: .about)
model.set([.uninstall], forSection: .destruction)
if AppConstants.Flags.isBeta {

View File

@ -1176,10 +1176,8 @@ extension ServiceViewController: UITableViewDataSource, UITableViewDelegate, Tog
model.add(.trusted)
model.add(.trustedPolicy)
model.add(.diagnostics)
if ProductManager.shared.isEligibleForFeedback() {
model.add(.feedback)
}
}
// headers
model.setHeader(L10n.App.Service.Sections.Vpn.header, forSection: .vpn)
@ -1233,7 +1231,12 @@ extension ServiceViewController: UITableViewDataSource, UITableViewDelegate, Tog
model.set([.vpnSurvivesSleep], forSection: .vpnSurvivesSleep)
model.set([.trustedPolicy], forSection: .trustedPolicy)
model.set([.dataCount, .serverConfiguration, .serverNetwork, .debugLog, .masksPrivateData], forSection: .diagnostics)
model.set([.faq, .reportIssue], forSection: .feedback)
var feedbackRows: [RowType] = [.faq]
if ProductManager.shared.isEligibleForFeedback() {
feedbackRows.append(.reportIssue)
}
model.set(feedbackRows, forSection: .feedback)
}
trustedNetworks.delegate = self