Update build array to properly exclude keys

This commit is contained in:
Gregory John Casamento 2023-02-28 03:33:50 -05:00
parent 08fc055321
commit b9841fe493

View file

@ -114,20 +114,17 @@
[kvp setLocalizedKey: localizedKey];
[kvp setKey: k];
[kvp setValue: v];
if (![_excludedKeys containsObject: k])
[kvp setExplicitlyIncluded: NO];
if ([_excludedKeys containsObject: k])
{
[kvp setExplicitlyIncluded: NO];
continue; // skip if excluded...
}
if ([_includedKeys containsObject: k])
{
[kvp setExplicitlyIncluded: YES];
}
else
{
[kvp setExplicitlyIncluded: NO];
}
[result addObject: kvp];
}
@ -313,7 +310,10 @@
{
[self willChangeValueForKey: NSContentBinding];
ASSIGNCOPY(_excludedKeys, excludedKeys);
[self setContent: _contentDictionary];
DESTROY(_arranged_objects);
_arranged_objects = [[GSObservableArray alloc]
initWithArray: [self arrangeObjects:
[self _buildArray: _contentDictionary]]];
[self didChangeValueForKey: NSContentBinding];
}