Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
0ddda836
Commit
0ddda836
authored
Jul 05, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IOS-130: Fix duplicate ATT events.
parent
77d8bbf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
1Weather/ViewModels/TodayViewModel.swift
+4
-1
No files found.
1Weather/ViewModels/TodayViewModel.swift
View file @
0ddda836
...
@@ -23,6 +23,7 @@ class TodayViewModel: ViewModelProtocol {
...
@@ -23,6 +23,7 @@ class TodayViewModel: ViewModelProtocol {
//Private
//Private
private
let
locationManager
:
LocationManager
private
let
locationManager
:
LocationManager
private
let
configManager
:
ConfigManager
private
let
configManager
:
ConfigManager
private
var
showingAttPrompt
:
Bool
=
false
private(set)
var
location
:
Location
?
private(set)
var
location
:
Location
?
public
lazy
var
todayCellFactory
:
TodayCellFactory
=
{
public
lazy
var
todayCellFactory
:
TodayCellFactory
=
{
...
@@ -102,8 +103,10 @@ class TodayViewModel: ViewModelProtocol {
...
@@ -102,8 +103,10 @@ class TodayViewModel: ViewModelProtocol {
}
}
else
{
else
{
if
#available(iOS 14.5, *)
{
if
#available(iOS 14.5, *)
{
if
self
.
configManager
.
config
.
showAttPrompt
&&
!
CCPAHelper
.
shared
.
isNewUser
&&
ATTrackingManager
.
trackingAuthorizationStatus
==
.
notDetermined
{
if
self
.
configManager
.
config
.
showAttPrompt
&&
!
CCPAHelper
.
shared
.
isNewUser
&&
ATTrackingManager
.
trackingAuthorizationStatus
==
.
notDetermined
&&
!
self
.
showingAttPrompt
{
self
.
showingAttPrompt
=
true
ATTrackingManager
.
requestTrackingAuthorization
{
result
in
ATTrackingManager
.
requestTrackingAuthorization
{
result
in
self
.
showingAttPrompt
=
false
self
.
onboardingFlowCompleted
()
self
.
onboardingFlowCompleted
()
if
result
==
.
authorized
{
if
result
==
.
authorized
{
analytics
(
log
:
.
ANALYTICS_ATT_ACCEPTED
)
analytics
(
log
:
.
ANALYTICS_ATT_ACCEPTED
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment