refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...

This commit is contained in:
Scott E. Graves 2025-03-20 21:56:22 -05:00
parent 6d2023ba1b
commit ea876bd55c

View File

@ -364,25 +364,26 @@ Map<String, dynamic> getChanged(
return {}; return {};
} }
Map<String, dynamic> changedSettings = {}; Map<String, dynamic> changed = {};
original.forEach((key, value) { original.forEach((key, value) {
if (DeepCollectionEquality().equals(value, updated[key])) { if (DeepCollectionEquality().equals(value, updated[key])) {
return; return;
} }
if (value is Map<String, dynamic>) { if (value is Map<String, dynamic>) {
changedSettings[key] = <String, dynamic>{}; changed[key] = <String, dynamic>{};
value.forEach((subKey, subValue) { value.forEach((subKey, subValue) {
if (DeepCollectionEquality().equals(subValue, updated[key][subKey])) { if (DeepCollectionEquality().equals(subValue, updated[key][subKey])) {
return; return;
} }
changedSettings[key][subKey] = updated[key][subKey]; changed[key][subKey] = updated[key][subKey];
}); });
} else { return;
changedSettings[key] = updated[key];
} }
changed[key] = updated[key];
}); });
return changedSettings; return changed;
} }