Skip to content

Commit

Permalink
Merged app center code (#5897)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Aug 22, 2021
1 parent 2fdc413 commit 97d178e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Files/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ private async Task<SettingsViewModel> Initialize()
FileTagsSettings = new FileTagsSettings();

// Send analytics to AppCenter
await StartAppCenter();
TrackAnalytics();

StartAppCenter();
return this;
}

Expand All @@ -69,7 +67,7 @@ private SettingsViewModel()
{
}

private async Task StartAppCenter()
private async void StartAppCenter()
{
JObject obj;
try
Expand All @@ -84,10 +82,7 @@ private async Task StartAppCenter()
}

AppCenter.Start((string)obj.SelectToken("key"), typeof(Analytics), typeof(Crashes));
}

private void TrackAnalytics()
{
Analytics.TrackEvent($"{nameof(DisplayedTimeStyle)} {DisplayedTimeStyle}");
Analytics.TrackEvent($"{nameof(ThemeHelper.RootTheme)} {ThemeHelper.RootTheme}");
Analytics.TrackEvent($"{nameof(PinRecycleBinToSideBar)} {PinRecycleBinToSideBar}");
Expand Down

0 comments on commit 97d178e

Please sign in to comment.