From d6d95a993ce8348beb69a187909778406eae79e8 Mon Sep 17 00:00:00 2001 From: LaughingLeader Date: Fri, 1 Sep 2023 22:16:43 -0500 Subject: [PATCH] Only update launcher preferences if an option is set --- GUI/ViewModels/MainWindowViewModel.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/GUI/ViewModels/MainWindowViewModel.cs b/GUI/ViewModels/MainWindowViewModel.cs index 25070fc1..5ad69aee 100644 --- a/GUI/ViewModels/MainWindowViewModel.cs +++ b/GUI/ViewModels/MainWindowViewModel.cs @@ -1236,10 +1236,13 @@ public bool SaveSettings() Settings.CanSaveSettings = false; Keys.SaveKeybindings(this); - RxApp.TaskpoolScheduler.ScheduleAsync(async (sch, t) => + if(Settings.DisableLauncherTelemetry || Settings.DisableLauncherModWarnings) { - await DivinityModDataLoader.UpdateLauncherPreferencesAsync(GetLarianStudiosAppDataFolder(), !Settings.DisableLauncherTelemetry, !Settings.DisableLauncherModWarnings); - }); + RxApp.TaskpoolScheduler.ScheduleAsync(async (sch, t) => + { + await DivinityModDataLoader.UpdateLauncherPreferencesAsync(GetLarianStudiosAppDataFolder(), !Settings.DisableLauncherTelemetry, !Settings.DisableLauncherModWarnings); + }); + } return true; } catch (Exception ex) @@ -2915,7 +2918,10 @@ private async Task ExportLoadOrderAsync() } else { - await DivinityModDataLoader.UpdateLauncherPreferencesAsync(dir, !Settings.DisableLauncherTelemetry, !Settings.DisableLauncherModWarnings); + if (Settings.DisableLauncherTelemetry || Settings.DisableLauncherModWarnings) + { + await DivinityModDataLoader.UpdateLauncherPreferencesAsync(dir, !Settings.DisableLauncherTelemetry, !Settings.DisableLauncherModWarnings); + } } if (result)