Skip to content

Commit dcc9fb7

Browse files
committed
Fixed background start + fixed Analytics
1 parent 781b79e commit dcc9fb7

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

gamevault/App.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public static App Instance
5656
protected override void OnStartup(StartupEventArgs e)
5757
{
5858
base.OnStartup(e);
59-
//AnalyticsHelper.Instance.InitHeartBeat();
60-
//AnalyticsHelper.Instance.RegisterGlobalEvents();
61-
//AnalyticsHelper.Instance.SendCustomEvent(CustomAnalyticsEventKeys.APP_INITIALIZED, AnalyticsHelper.Instance.GetSysInfo());
59+
AnalyticsHelper.Instance.InitHeartBeat();
60+
AnalyticsHelper.Instance.RegisterGlobalEvents();
61+
AnalyticsHelper.Instance.SendCustomEvent(CustomAnalyticsEventKeys.APP_INITIALIZED, AnalyticsHelper.Instance.GetSysInfo());
6262
}
6363

6464
private async void Application_Startup(object sender, StartupEventArgs e)
@@ -82,7 +82,7 @@ private async void Application_Startup(object sender, StartupEventArgs e)
8282
LogUnhandledException(ex);
8383
}
8484

85-
// AnalyticsHelper.Instance.SendCustomEvent(CustomAnalyticsEventKeys.USER_SETTINGS, AnalyticsHelper.Instance.PrepareSettingsForAnalytics());
85+
//AnalyticsHelper.Instance.SendCustomEvent(CustomAnalyticsEventKeys.USER_SETTINGS, AnalyticsHelper.Instance.PrepareSettingsForAnalytics());
8686

8787
// bool startMinimizedByPreferences = false;
8888
// bool startMinimizedByCLI = false;

gamevault/PipeServiceHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private static void SafeDispose(IDisposable? disposable)
411411
// You should really implement new actions that you add
412412
throw new NotImplementedException($"Action {options.Action} not implemented");
413413
}
414-
414+
showMainWindow = !SettingsViewModel.Instance.BackgroundStart;
415415
if (options.Minimized.HasValue)
416416
{
417417
// If we're provided a Minimized value then we can explicitly use that for whether or not to be shown

gamevault/Windows/LoginWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ private async Task Login(UserProfile profile, bool firstTimeLogin = false)
204204
if (ViewModel.RememberMe)
205205
{
206206
Preferences.Set(AppConfigKey.LastUserProfile, profile.RootDir, ProfileManager.ProfileConfigFile);
207-
}
207+
}
208208
App.Current.MainWindow = new MainWindow();
209-
App.Current.MainWindow.Show();
209+
//Window Visibility will be determined by the protocol handler
210210
try
211211
{
212212
this.DialogResult = true;//will throw error, if its called from the MainWindow

gamevault/Windows/MainWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ private void InitBootTasks()
4545
await GameTimeTracker.Start();
4646
}
4747
});
48+
AnalyticsHelper.Instance.SendCustomEvent(CustomAnalyticsEventKeys.USER_SETTINGS, AnalyticsHelper.Instance.PrepareSettingsForAnalytics());
4849
}
4950
private async void HamburgerMenuControl_OnItemInvoked(object sender, HamburgerMenuItemInvokedEventArgs args)
5051
{

0 commit comments

Comments
 (0)