mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 14:23:26 +00:00
Removed FFImageLoading dependencies and replaced the CachedImage with 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
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Bit.App.Controls
|
||||
_iconImage.HeightRequest = ICON_IMAGE_DEFAULT_WIDTH * fontScale;
|
||||
}
|
||||
|
||||
protected override CachedImage Icon => _iconImage;
|
||||
protected override Image Icon => _iconImage;
|
||||
|
||||
protected override IconLabel IconPlaceholder => _iconPlaceholderImage;
|
||||
|
||||
@@ -40,5 +40,21 @@ namespace Bit.App.Controls
|
||||
ButtonCommand?.Execute(cipherItem.Cipher);
|
||||
}
|
||||
}
|
||||
|
||||
private async void Image_OnLoaded(object sender, EventArgs e)
|
||||
{
|
||||
if (Handler?.MauiContext == null) { return; }
|
||||
if (_iconImage?.Source == null) { return; }
|
||||
|
||||
var result = await _iconImage.Source.GetPlatformImageAsync(Handler.MauiContext);
|
||||
if (result == null)
|
||||
{
|
||||
Icon_Error(sender, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon_Success(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user