Fixed settings keeping their plugin value after a configuration was withdrawn (#903)
Build and Release / Determine run mode (push) Has been cancelled
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Sync Flatpak repo (push) Has been cancelled
Build and Release / Collect Flatpak artifacts (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-08-09 20:47:30 +02:00
1 parent a3cccb7c7d
commit b9ec13edcf
10 files changed
+239 -11

No files matched your search

@@ -913,6 +913,13 @@ public static partial class ManagedConfiguration
if (!MayManageSetting(configPluginId, configMeta))
return false;
//
// Remember the value the user had chosen before any configuration plugin took this setting
// over. Once no plugin manages it anymore, we hand that value back to the user:
//
if (successful)
configMeta.CaptureUserValueSnapshot();
switch (successful)
{
case true:
@@ -967,6 +974,15 @@ public static partial class ManagedConfiguration
if (!MayManageSetting(configPluginId, configMeta))
return false;
//
// Remember the value the user had chosen before any configuration plugin took this setting
// over. Once no plugin manages it anymore, we hand that value back to the user. This has to
// happen before the managed state below changes, because only an unmanaged setting holds a
// value which belongs to the user:
//
if (successful)
configMeta.CaptureUserValueSnapshot();
switch (successful)
{
case true when managedMode is ManagedConfigurationMode.LOCKED:
@@ -1008,7 +1024,7 @@ public static partial class ManagedConfiguration
case false when configMeta.ManagedMode is ManagedConfigurationMode.EDITABLE_DEFAULT
&& TryGetEditableDefaultState(settingName, out var editableDefaultStateToRemove)
&& editableDefaultStateToRemove.ConfigPluginId == configPluginId:
configMeta.ClearEditableDefaultConfiguration();
configMeta.ResetEditableDefaultConfiguration(HasUserChangedEditableDefault(configMeta, editableDefaultStateToRemove));
ClearEditableDefaultState(settingName);
break;
}
@@ -1033,7 +1049,7 @@ public static partial class ManagedConfiguration
return ManagedConfigurationMode.LOCKED;
}
private static string SerializeManagedScalarValue<TValue>(TValue value) => value switch
internal static string SerializeManagedScalarValue<TValue>(TValue value) => value switch
{
null => string.Empty,
string text => text,