Browse Source

Merge pull request #182 from provokateurin/fix/settings-export

neon: Fix exporting disabled settings
pull/183/head
Kate 2 years ago committed by GitHub
parent
commit
0625615be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/neon/lib/src/utils/settings_export_helper.dart

6
packages/neon/lib/src/utils/settings_export_helper.dart

@ -58,26 +58,32 @@ class SettingsExportHelper {
Map<String, dynamic> toJsonExport() => {
'global': {
for (final option in globalOptions.options) ...{
if (option.enabled.value) ...{
option.key: option.serialize(),
},
},
},
'apps': {
for (final appImplementation in appImplementations) ...{
appImplementation.id: {
for (final option in appImplementation.options.options) ...{
if (option.enabled.value) ...{
option.key: option.serialize(),
},
},
},
},
},
'accounts': {
for (final account in accountSpecificOptions.keys) ...{
account.id: {
for (final option in accountSpecificOptions[account]!) ...{
if (option.enabled.value) ...{
option.key: option.serialize(),
},
},
},
},
},
};
}

Loading…
Cancel
Save