Skip to content

Commit

Permalink
refactor(GiniCaptureSDK): Refactor no results screen screen_shown eve…
Browse files Browse the repository at this point in the history
…nt properties to use `AnalyticsMapper`

PP-392
  • Loading branch information
ValentinaIancu-Gini committed Apr 17, 2024
1 parent 0bae068 commit 1494909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ final class NoResultScreenViewController: UIViewController {
return text
}
}

var analyticsValue: String {
switch self {
case .pdf:
return "pdf"
case .image:
return "image"
case .qrCode:
return "qrCode"
default:
return "unknown"
}
}
}

lazy var tableView: UITableView = {
Expand Down Expand Up @@ -125,8 +112,8 @@ final class NoResultScreenViewController: UIViewController {
super.viewDidLoad()
self.setupView()

let eventProperties = [AnalyticsProperty(key: .noResultType,
value: type.analyticsValue)]
let eventProperties = [AnalyticsProperty(key: .documentType,
value: AnalyticsMapper.documentTypeAnalytics(from: type))]
AnalyticsManager.trackScreenShown(screenName: .noResults,
properties: eventProperties)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ extension GiniScreenAPICoordinator: AnalysisDelegate {
let viewController = ErrorScreenViewController(giniConfiguration: giniConfiguration,
type: errorType,
documentType: pages.type ?? .pdf,
viewModel: viewModel,
errorAnalytics: ErrorAnalytics(type: ""))
viewModel: viewModel)

screenAPINavigationController.pushViewController(viewController, animated: animated)
}
Expand Down

0 comments on commit 1494909

Please sign in to comment.