Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Auto complete for the custom bookmark titles in the address bar #6111

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions js/components/urlBarSuggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,15 @@ class UrlBarSuggestions extends ImmutableComponent {
return site.get('location')
}),
sortHandler: sortBasedOnLocationPos,
formatTitle: (site) => site.get('title'),
formatTitle: (site) => {
const customTitle = site.get('customTitle')
const title = site.get('title')

return customTitle ? `${customTitle} (${title})` : title
},
formatUrl: (site) => site.get('location'),
filterValue: (site) => {
const title = site.get('title') || ''
const title = site.get('customTitle') || site.get('title') || ''
const location = site.get('location') || ''
return (title.toLowerCase().includes(urlLocationLower) ||
location.toLowerCase().includes(urlLocationLower)) &&
Expand Down