Skip to content

Commit

Permalink
Use display image on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 11, 2020
1 parent 357299d commit 58a98be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MediaManager/Platforms/Ios/Media/AVAssetImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public async Task<object> ProvideImage(IMediaItem mediaItem)
object image = null;
try
{
if (!string.IsNullOrEmpty(mediaItem.ImageUri))
if (!string.IsNullOrEmpty(mediaItem.DisplayImageUri))
{
var location = MediaManager.Extractor.GetMediaLocation(mediaItem.ImageUri);
var location = MediaManager.Extractor.GetMediaLocation(mediaItem.DisplayImageUri);
if (location == MediaLocation.Resource)
mediaItem.Image = image = UIImage.FromBundle(mediaItem.ImageUri);
mediaItem.Image = image = UIImage.FromBundle(mediaItem.DisplayImageUri);
else
mediaItem.Image = image = UIImage.LoadFromData(NSData.FromUrl(new NSUrl(mediaItem.ImageUri)));
mediaItem.Image = image = UIImage.LoadFromData(NSData.FromUrl(new NSUrl(mediaItem.DisplayImageUri)));
}
if (image == null && !string.IsNullOrEmpty(mediaItem.AlbumImageUri))
{
Expand Down

0 comments on commit 58a98be

Please sign in to comment.