[PR #3123] [PM-7134] Replace FFImageLoading with Net MAUI Image Control to avoid background issues #4037

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

Original Pull Request: https://github.com/bitwarden/android/pull/3123

State: closed
Merged: No


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

There is currently a crash that occurs sometimes when the app is in Background. That crash cause is suspected to be caused by FFImageLoading.
As such this PR was created to see the viability of removing FFImageLoading and using MAUI Image but still have Caching for icons.

Code changes

FFImageLoading CachedImage was replaced with MAUI Image and an UriImageSource was setup for icons to still have caching.
This seems to be working perfectly on Android but on iOS there are issues with the list not correctly loading some icons.

  • Core.csproj: Removed the FFImageLoaging nuget
  • App.csproj: Removed the FFImageLoaging nuget
  • CachedImage.cs: Removed as it's no longer needed
  • MauiProgram.cs: Removed FFImageLoading init and Stubs used by Unit tests
  • BaseCipherViewCell.cs: Removed Unit Tests stubs and changed CachedImage to Image
  • CipherItemViewModel.cs: Changed IconImageSource to be a UriImageSource instead of string to support the MAUI Caching for Image
  • AuthenticatorViewCell.xaml: Replaced CachedImage with Image
  • AuthenticatorViewCell.xaml.cs: Replaced CachedImage with Image and added the Image_OnLoaded method that tries to work with the previously existing Icon_Error and Icon_Success
  • CipherViewCell.xaml: Replaced CachedImage with Image
  • CipherViewCell.xaml.cs: Replaced CachedImage with Image and added the Image_OnLoaded method that tries to work with the previously existing Icon_Error and Icon_Success

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/3123 **State:** closed **Merged:** No --- ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective There is currently a crash that occurs sometimes when the app is in Background. That crash cause is suspected to be caused by FFImageLoading. As such this PR was created to see the viability of removing FFImageLoading and using MAUI Image but still have Caching for icons. ## Code changes FFImageLoading CachedImage was replaced with MAUI Image and an UriImageSource was setup for icons to still have caching. **This seems to be working perfectly on Android but on iOS there are issues with the list not correctly loading some icons.** * **Core.csproj:** Removed the FFImageLoaging nuget * **App.csproj:** Removed the FFImageLoaging nuget * **CachedImage.cs:** Removed as it's no longer needed * **MauiProgram.cs:** Removed FFImageLoading init and Stubs used by Unit tests * **BaseCipherViewCell.cs:** Removed Unit Tests stubs and changed CachedImage to Image * **CipherItemViewModel.cs:** Changed IconImageSource to be a UriImageSource instead of string to support the MAUI Caching for Image * **AuthenticatorViewCell.xaml:** Replaced CachedImage with Image * **AuthenticatorViewCell.xaml.cs:** Replaced CachedImage with Image and added the Image_OnLoaded method that tries to work with the previously existing Icon_Error and Icon_Success * **CipherViewCell.xaml:** Replaced CachedImage with Image * **CipherViewCell.xaml.cs:** Replaced CachedImage with Image and added the Image_OnLoaded method that tries to work with the previously existing Icon_Error and Icon_Success ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:39:54 -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#4037