Renames AkitaOriginData.storeOriginFavicon to AkitaOriginData.setOriginFavicon (and all usages) to reflect that it updates the originData object rather than storing it in the browser's local storage.
Removes the updateOriginFavicon function.
Fixes #148 by adding a new function storeOriginFavicon in storage.js (Note that this function is not related to the renamed AkitaOriginData.storeOriginFavicon function) which is called by updateAkitaData to asynchronously fetch, update, and store the favicon for an origin.
Bug explanation
This bug is a regression introduced in #141.
This PR made it so that favicon fetching did not block storing originData. This resulted in a regression where the originData object was being updated after it had already been stored, meaning the updated originData object was never stored.
Fix explanation
Fixing this issue requires introducing a new function storeOriginFavicon which fetches the favicon, and once/if the fetch resolves, updates and stores the originData safely using a lock.
Fixes #148
Changes
AkitaOriginData.storeOriginFavicon
toAkitaOriginData.setOriginFavicon
(and all usages) to reflect that it updates the originData object rather than storing it in the browser's local storage.updateOriginFavicon
function.storeOriginFavicon
instorage.js
(Note that this function is not related to the renamedAkitaOriginData.storeOriginFavicon
function) which is called byupdateAkitaData
to asynchronously fetch, update, and store the favicon for an origin.Bug explanation
This bug is a regression introduced in #141. This PR made it so that favicon fetching did not block storing originData. This resulted in a regression where the originData object was being updated after it had already been stored, meaning the updated originData object was never stored.
Fix explanation
Fixing this issue requires introducing a new function
storeOriginFavicon
which fetches the favicon, and once/if the fetch resolves, updates and stores the originData safely using a lock.Fix demo image