Skip to content

Commit

Permalink
Exclude crash section from the Privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
vikmeup committed Aug 21, 2018
1 parent 45d0260 commit 7814aa9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions Trust/Settings/Types/Analitics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@
import UIKit

enum Analitics: String {
case crashlytics
case branch
case answer

var title: String {
switch self {
case .answer: return R.string.localizable.dailyUsage()
case .branch: return R.string.localizable.deferredDeepLinking()
case .crashlytics: return R.string.localizable.crashReports()
}
}

var description: String {
switch self {
case .crashlytics:
return R.string.localizable.settingsAnaliticsCrashlyticsDescription()
case .branch:
return R.string.localizable.settingsAnaliticsBranchDescription()
case .answer:
Expand Down
8 changes: 0 additions & 8 deletions Trust/Settings/ViewControllers/PrivacyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,5 @@ final class PrivacyViewController: FormViewController {
self?.viewModel.branch.update(with: enabled)
Branch.setTrackingDisabled(!enabled)
}
form +++ Section(footer: viewModel.crashlytics.description)

<<< SwitchRow {
$0.title = viewModel.crashlytics.title
$0.value = viewModel.crashlytics.isEnabled
}.onChange { [weak self] row in
self?.viewModel.crashlytics.update(with: row.value ?? false)
}
}
}
2 changes: 0 additions & 2 deletions Trust/Settings/ViewModels/AnaliticsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ struct AnaliticsViewModel {

let branch = Analitics.branch

let crashlytics = Analitics.crashlytics

var title: String {
return NSLocalizedString("settings.privacy.title", value: "Privacy", comment: "")
}
Expand Down

0 comments on commit 7814aa9

Please sign in to comment.