From 1c8f9f0558b09d272afd26b92712d7f68ed3162d Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 13 Jan 2023 13:07:42 +0100 Subject: [PATCH] neon: Fix exporting disabled settings --- .../neon/lib/src/utils/settings_export_helper.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/neon/lib/src/utils/settings_export_helper.dart b/packages/neon/lib/src/utils/settings_export_helper.dart index 62c73550..321f6bf7 100644 --- a/packages/neon/lib/src/utils/settings_export_helper.dart +++ b/packages/neon/lib/src/utils/settings_export_helper.dart @@ -58,14 +58,18 @@ class SettingsExportHelper { Map toJsonExport() => { 'global': { for (final option in globalOptions.options) ...{ - option.key: option.serialize(), + if (option.enabled.value) ...{ + option.key: option.serialize(), + }, }, }, 'apps': { for (final appImplementation in appImplementations) ...{ appImplementation.id: { for (final option in appImplementation.options.options) ...{ - option.key: option.serialize(), + if (option.enabled.value) ...{ + option.key: option.serialize(), + }, }, }, }, @@ -74,7 +78,9 @@ class SettingsExportHelper { for (final account in accountSpecificOptions.keys) ...{ account.id: { for (final option in accountSpecificOptions[account]!) ...{ - option.key: option.serialize(), + if (option.enabled.value) ...{ + option.key: option.serialize(), + }, }, }, },