Skip to content

Commit

Permalink
Prevent adding separator in browsing menu if there are no items above
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 committed Dec 18, 2024
1 parent 1b0d0cb commit 8ede61b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ extension TabViewController {
}))
}

entries.append(.separator)
// Do not add separator if there are no entries so far
if entries.count > 0 {
entries.append(.separator)
}

let shortcutsEntries = buildShortcutsEntries(includeBookmarks: false)
entries.append(contentsOf: shortcutsEntries)
Expand Down

0 comments on commit 8ede61b

Please sign in to comment.