From 40ac713c4ecd9ff7d8b8a78942f11a76f6597974 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 2 Dec 2020 00:16:53 -0500 Subject: [PATCH] Fix signature of function callback. Fixes https://github.com/brave/brave-browser/issues/12997 Fix Linting for Android/Linux --- ios/browser/api/bookmarks/brave_bookmarks_api.h | 5 +++-- ios/browser/api/bookmarks/brave_bookmarks_api.mm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/browser/api/bookmarks/brave_bookmarks_api.h b/ios/browser/api/bookmarks/brave_bookmarks_api.h index f77941d05085..0624154db3a7 100644 --- a/ios/browser/api/bookmarks/brave_bookmarks_api.h +++ b/ios/browser/api/bookmarks/brave_bookmarks_api.h @@ -73,8 +73,9 @@ OBJC_EXPORT @property(nonatomic, readonly) NSUInteger childCount; - (nullable IOSBookmarkNode*)childAtIndex:(NSUInteger)index; -- (NSArray*)nestedChildFoldersFiltered:(BOOL(^)(BookmarkFolder*))included - NS_SWIFT_NAME(nestedChildFolders(where:)); +- (NSArray*)nestedChildFoldersFiltered: + (BOOL(^)(BookmarkFolder*))included + NS_SWIFT_NAME(nestedChildFolders(where:)); - (void)setTitle:(NSString*)title; - (bool)getMetaInfo:(NSString*)key value:(NSString* _Nonnull* _Nullable)value; diff --git a/ios/browser/api/bookmarks/brave_bookmarks_api.mm b/ios/browser/api/bookmarks/brave_bookmarks_api.mm index 86bf848a723d..0308b3141437 100644 --- a/ios/browser/api/bookmarks/brave_bookmarks_api.mm +++ b/ios/browser/api/bookmarks/brave_bookmarks_api.mm @@ -318,7 +318,7 @@ - (IOSBookmarkNode*)parent { - (NSArray*)nestedChildFolders { // Returns a list of ALL nested folders - return [self nestedChildFoldersFiltered:^{ return true; }]; + return [self nestedChildFoldersFiltered:^BOOL(BookmarkFolder*){ return true; }]; } - (NSUInteger)childCount {