sailfishos / sailfish-browser

Sailfish Browser
https://github.com/sailfishos/sailfish-browser/wiki/Sailfish-Browser-wiki
Mozilla Public License 2.0
305 stars 86 forks source link

[browser] Fix icon for add to app grid. Fixes JB#57628 #992

Closed mkenttala closed 2 years ago

llewelld commented 2 years ago

This is a nice fix in the case where the site has a favIcon set (it worked for me, certainly).

Is it also worth covering the case where there's no favicon and taking a snapshot of the page in that case, as is done for the favourites grid? I.e. using grabThumbnail as happens in apps/browser/qml/pages/components/FavoriteGrid.qml ?

mkenttala commented 2 years ago

Now grabs the icon from the page if favicon is empty.

llewelld commented 2 years ago

This is working nicely, the icon appears even if there's no favicon now; great!

However, I also notice a strange side effect in that if there's no favicon for the page, pressing on the Favourite star in the toolbar footer now opens the "Add to app grid" page.

This only happens after "Add to app grid" has been selected at least once prior to this, so presumably it's because the webPage.onThumbnailResult signal is still connected (or something like that)?

mkenttala commented 2 years ago

Disconnect added for the grab handler. Some problems with the scope of variables but seems ok now.

llewelld commented 2 years ago

This works nicely now, thank you!