Add FAQ link in Organizer (home)

This commit is contained in:
Davide De Rosa 2019-10-22 14:25:29 +02:00
parent edeec13ccb
commit 0c8ccd8cc3
1 changed files with 15 additions and 5 deletions

View File

@ -69,7 +69,7 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
model.setHeader(L10n.Core.Organizer.Sections.Support.header, forSection: .support)
model.setHeader(L10n.Core.Organizer.Sections.Feedback.header, forSection: .feedback)
model.set([.connectionStatus], forSection: .vpn)
model.set([.donate, .translate], forSection: .support)
model.set([.donate, .translate, .faq], forSection: .support)
model.set([.joinCommunity, .writeReview], forSection: .feedback)
model.set([.openAbout], forSection: .about)
model.set([.uninstall], forSection: .destruction)
@ -219,8 +219,8 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
perform(segue: StoryboardSegue.Organizer.donateSegueIdentifier, sender: nil)
}
private func visitPatreon() {
UIApplication.shared.open(AppConstants.URLs.patreon, options: [:], completionHandler: nil)
private func visit(_ url: URL) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
private func offerTranslation() {
@ -386,6 +386,8 @@ extension OrganizerViewController {
case translate
case faq
case joinCommunity
case writeReview
@ -468,6 +470,11 @@ extension OrganizerViewController {
cell.leftText = L10n.Core.Organizer.Cells.Translate.caption
return cell
case .faq:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = L10n.Core.About.Cells.Faq.caption
return cell
case .joinCommunity:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = L10n.Core.Organizer.Cells.JoinCommunity.caption
@ -522,11 +529,14 @@ extension OrganizerViewController {
donateToDeveloper()
// case .patreon:
// visitPatreon()
// visit(AppConstants.URLs.patreon)
case .translate:
offerTranslation()
case .faq:
visit(AppConstants.URLs.faq)
case .joinCommunity:
subscribeSubreddit()