fix: make TouchBarPopover and TouchBarGroup work (#27901)

* fix: use correct `orderedItem` touchbar property

* fix: correct parent in touchbar group and popover

* fix: preserve property hook order
This commit is contained in:
Erick Zhao 2021-03-01 13:34:00 -08:00 committed by GitHub
parent e5a9a1ebd7
commit 2d0ad0b96a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -551,7 +551,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
gin_helper::PersistentDictionary child;
std::vector<gin_helper::PersistentDictionary> items;
if (settings.Get("child", &child) && child.Get("ordereredItems", &items)) {
if (settings.Get("child", &child) && child.Get("orderedItems", &items)) {
item.popoverTouchBar =
[self touchBarFromItemIdentifiers:[self identifiersFromSettings:items]];
}
@ -572,7 +572,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
if (!settings.Get("child", &child))
return nil;
std::vector<gin_helper::PersistentDictionary> items;
if (!child.Get("ordereredItems", &items))
if (!child.Get("orderedItems", &items))
return nil;
NSMutableArray* generatedItems = [NSMutableArray array];
@ -601,7 +601,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
if (!settings.Get("child", &child))
return;
std::vector<gin_helper::PersistentDictionary> items;
if (!child.Get("ordereredItems", &items))
if (!child.Get("orderedItems", &items))
return;
item.groupTouchBar =