Skip to content

Commit

Permalink
[iOS] Improve check for YouTube favourite in new onboarding popup
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Jan 22, 2025
1 parent 820ee05 commit daeecf8
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 daeecf8

Please sign in to comment.