[PR #1572] [MERGED] Website favicon only shows if hostname is first element #2972

Closed
opened 2025-11-26 23:26:36 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1572
Author: @jlf0dev
Created: 10/11/2021
Status: Merged
Merged: 10/12/2021
Merged by: @jlf0dev

Base: masterHead: bug/find-website-favicon


📝 Commits (1)

  • 3284a91 loop through URIs to find website before showing default icons

📊 Changes

3 files changed (+62 additions, -34 deletions)

View changed files

📝 src/App/Controls/CipherViewCell/CipherViewCell.xaml (+1 -1)
📝 src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs (+19 -3)
📝 src/App/Utilities/IconImageConverter.cs (+42 -30)

📄 Description

Overview

Website Icon (favicon) only shows if website url (hostname) is in the first url element.
If the first url is an app link (eg. androidapp:// ) and the website url as second element, the favicon will not show.

This fix iterates through the list of urls and looks for the first website url for the icon. If no website is found, it defaults to the android, apple, or globe icon.

Closes #1120

Changes

  • IconImageConverter.cs - Create static class for uri logic (keeping converter for future)
  • CipherViewCellViewModel.cs - Create new property in viewmodel for icon source, making sure to cache result
    • Check if icons are enabled and source for icon before showing default glyph
  • CipherViewCell.xaml - Bind source to new property in viewmodel

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1572 **Author:** [@jlf0dev](https://github.com/jlf0dev) **Created:** 10/11/2021 **Status:** ✅ Merged **Merged:** 10/12/2021 **Merged by:** [@jlf0dev](https://github.com/jlf0dev) **Base:** `master` ← **Head:** `bug/find-website-favicon` --- ### 📝 Commits (1) - [`3284a91`](https://github.com/bitwarden/android/commit/3284a91a8c8eb8db046169ec7fd834afebcfe6eb) loop through URIs to find website before showing default icons ### 📊 Changes **3 files changed** (+62 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Controls/CipherViewCell/CipherViewCell.xaml` (+1 -1) 📝 `src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs` (+19 -3) 📝 `src/App/Utilities/IconImageConverter.cs` (+42 -30) </details> ### 📄 Description # Overview Website Icon (favicon) only shows if website url (hostname) is in the first url element. If the first url is an app link (eg. androidapp:// ) and the website url as second element, the favicon will not show. This fix iterates through the list of urls and looks for the first website url for the icon. If no website is found, it defaults to the android, apple, or globe icon. Closes #1120 # Changes - **IconImageConverter.cs** - Create static class for uri logic (keeping converter for future) - **CipherViewCellViewModel.cs** - Create new property in viewmodel for icon source, making sure to cache result - Check if icons are enabled and source for icon before showing default glyph - **CipherViewCell.xaml** - Bind source to new property in viewmodel --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:26:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2972