Skip to content

Commit

Permalink
Use png_data for favicon of bookmarks imported from HTML
Browse files Browse the repository at this point in the history
fix brave#4339

requires brave/muon#64

Auditors: @bridiver, @bbondy

Test Plan:
1. Import bookmarks from HTML file
2. There should be favicon shows when show favicon option is on
  • Loading branch information
darkdh committed Sep 28, 2016
1 parent bebb4d6 commit fc88a2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ importer.on('add-bookmarks', (e, bookmarks, topLevelFolder) => {
importer.on('add-favicons', (e, detail) => {
let faviconMap = {}
detail.forEach((entry) => {
faviconMap[entry.urls[0]] = entry.favicon_url
if (entry.favicon_url.startsWith('made-up-favicon:')) {
faviconMap[entry.urls[0]] = entry.png_data
} else {
faviconMap[entry.urls[0]] = entry.favicon_url
}
})
let sites = AppStore.getState().get('sites')
sites = sites.map((site) => {
Expand Down

0 comments on commit fc88a2d

Please sign in to comment.