From fc88a2daa0e39532fb017eadaf6302d5a98cdd34 Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Wed, 28 Sep 2016 12:57:06 +0800 Subject: [PATCH] Use png_data for favicon of bookmarks imported from HTML fix #4339 requires https://github.com/brave/electron/pull/64 Auditors: @bridiver, @bbondy Test Plan: 1. Import bookmarks from HTML file 2. There should be favicon shows when show favicon option is on --- app/importer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/importer.js b/app/importer.js index 1d7f22f246c..11216f7bda2 100644 --- a/app/importer.js +++ b/app/importer.js @@ -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) => {