Skip to content

Commit

Permalink
Merge pull request #27314 from brave/ios-new-onboarding-yt-check-fix
Browse files Browse the repository at this point in the history
[iOS] Improve check for YouTube favourite in new onboarding popup
  • Loading branch information
kylehickinson authored Jan 23, 2025
2 parents 225d5f1 + daeecf8 commit 5357485
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ class NewTabPageViewController: UIViewController {
frc.fetchRequest.fetchLimit = 5
try? frc.performFetch()
guard let section = sections.firstIndex(where: { $0 is FavoritesSectionProvider }),
let item = frc.fetchedObjects?.firstIndex(where: { $0.url == "https://m.youtube.com" }),
let item = frc.fetchedObjects?.firstIndex(where: {
$0.url.flatMap(URL.init(string:))?.baseDomain == "youtube.com"
}),
let cell = collectionView.cellForItem(at: .init(item: item, section: section))
else {
return nil
Expand Down

0 comments on commit 5357485

Please sign in to comment.