From 00dc84ac636cb38666ee4f8ea395e8f042375759 Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Thu, 14 Mar 2024 15:08:40 +0000 Subject: [PATCH] add url to bookmark and history suggestions --- DuckDuckGo/AutocompleteViewController.swift | 11 ++++- DuckDuckGo/Base.lproj/Autocomplete.storyboard | 44 +++++++++++++------ DuckDuckGo/SuggestionTableViewCell.swift | 9 +++- 3 files changed, 49 insertions(+), 15 deletions(-) diff --git a/DuckDuckGo/AutocompleteViewController.swift b/DuckDuckGo/AutocompleteViewController.swift index d65228f018..8f57da2bb2 100644 --- a/DuckDuckGo/AutocompleteViewController.swift +++ b/DuckDuckGo/AutocompleteViewController.swift @@ -270,7 +270,16 @@ extension AutocompleteViewController: UITableViewDataSource { if appSettings.currentAddressBarPosition.isBottom && suggestions.isEmpty { return view.frame.height } - return 46 + + let defaultHeight: CGFloat = 46 + guard suggestions.indices.contains(indexPath.row) else { return defaultHeight } + + switch suggestions[indexPath.row] { + case .bookmark, .historyEntry: + return 60 + default: + return defaultHeight + } } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { diff --git a/DuckDuckGo/Base.lproj/Autocomplete.storyboard b/DuckDuckGo/Base.lproj/Autocomplete.storyboard index 3254452129..d07fecf4fd 100644 --- a/DuckDuckGo/Base.lproj/Autocomplete.storyboard +++ b/DuckDuckGo/Base.lproj/Autocomplete.storyboard @@ -1,9 +1,10 @@ - + - + + @@ -20,7 +21,7 @@ - + @@ -35,12 +36,23 @@ - + + + + + + +