improv: desktop entries update

This commit is contained in:
wiiznokes 2024-07-13 01:13:17 +02:00 committed by GitHub
parent ab7a71a057
commit 172532056b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 559 additions and 663 deletions

View file

@ -151,17 +151,13 @@ impl App {
// Generate List of Icon sources in order of priority
let mut icon_sources = vec![
// First use the defined icon source, if it is defined
Some(icon_source)
.filter(|s| !s.is_empty())
.map(|url| fetch(url)),
Some(icon_source).filter(|s| !s.is_empty()).map(fetch),
];
if let Some(domain) = domain {
icon_sources.append(&mut vec![
// Searches for the favicon if it's not defined at the root of the domain.
favicon_from_page(&domain, client)
.await
.map(|url| fetch(url)),
favicon_from_page(&domain, client).await.map(fetch),
// If not found, fetch from root domain.
Some(fetch(["https://", &domain, "/favicon.ico"].concat())),
// If all else fails, try Google.