Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dinisvieira
Copy link
Mannequin

@dinisvieira dinisvieira mannequin commented Mar 28, 2024

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

… the MAUI Image Control

Added UriImageSource for MAUI Image to support Cached icons for 90 days
Removed Stubs used to avoid issues with Unit Tests and FFImageLoading
@vvolkgang vvolkgang changed the title Replace FFImageLoading with Net MAUI Image Control to avoid background issues [PM-7134] Replace FFImageLoading with Net MAUI Image Control to avoid background issues Apr 1, 2024
@vvolkgang vvolkgang added the hold do not merge yet label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android hold do not merge yet iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants