From a01d0ff2ae4a706bb8d1bd45e2f36c3e4f251087 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:16:22 +0000 Subject: [PATCH] Refine IsAutoUpdateAllowed: group in (), invert, rename v to env, only accept false Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Agent-Logs-Url: https://github.com/Tyrrrz/DiscordChatExporter/sessions/1467eee2-3069-4f0b-abdf-b1dc65e00a9a --- DiscordChatExporter.Gui/StartOptions.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DiscordChatExporter.Gui/StartOptions.cs b/DiscordChatExporter.Gui/StartOptions.cs index 68baf4f8..20cd035a 100644 --- a/DiscordChatExporter.Gui/StartOptions.cs +++ b/DiscordChatExporter.Gui/StartOptions.cs @@ -22,9 +22,10 @@ public partial class StartOptions ? Path.Combine(path, "Settings.dat") : path : Path.Combine(AppContext.BaseDirectory, "Settings.dat"), - IsAutoUpdateAllowed = - Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is not - { } v - || !(v == "0" || v.Equals("false", StringComparison.OrdinalIgnoreCase)), + IsAutoUpdateAllowed = !( + Environment.GetEnvironmentVariable("DISCORDCHATEXPORTER_ALLOW_AUTO_UPDATE") is + { } env + && env.Equals("false", StringComparison.OrdinalIgnoreCase) + ), }; }