Don't update favicon setting and image when unnecessary

This commit is contained in:
Alice Gaudon 2020-05-19 07:32:38 +02:00
parent 52cb434733
commit 8de48223d6

View File

@ -511,7 +511,7 @@ function loadService(serviceId, service) {
// Load favicon // Load favicon
service.view.addEventListener('page-favicon-updated', event => { service.view.addEventListener('page-favicon-updated', event => {
console.debug('Loaded favicons for', service.name, event.favicons); console.debug('Loaded favicons for', service.name, event.favicons);
if (event.favicons.length > 0) { if (event.favicons.length > 0 && service.favicon !== event.favicons[0]) {
ipcRenderer.send('setServiceFavicon', serviceId, event.favicons[0]); ipcRenderer.send('setServiceFavicon', serviceId, event.favicons[0]);
if (service.useFavicon) { if (service.useFavicon) {
const img = document.createElement('img'); const img = document.createElement('img');