Skip to content

Commit

Permalink
center no suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Oct 6, 2023
1 parent a9698f5 commit 90c3859
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DuckDuckGo/AutocompleteViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ extension AutocompleteViewController: UITableViewDataSource {
return cell
}

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if isAddressBarAtBottom && suggestions.isEmpty {
return view.frame.height
}
return 46
}

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return receivedResponse ? max(Constants.minItems, suggestions.count) : 0
}
Expand Down

0 comments on commit 90c3859

Please sign in to comment.