Skip to content

Commit

Permalink
Only update launcher preferences if an option is set
Browse files Browse the repository at this point in the history
  • Loading branch information
LaughingLeader committed Sep 2, 2023
1 parent 29f2c92 commit d6d95a9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions GUI/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -2915,7 +2918,10 @@ private async Task<bool> 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)
Expand Down

0 comments on commit d6d95a9

Please sign in to comment.