Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[AvatarView] Show initials if stream is empty #1125

Merged
merged 1 commit into from
Mar 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ async void OnSourcePropertyChanged(bool isBindingContextChanged)

var stream = await getStreamAsync(uriImageSource, imageLoadingTokenSource.Token);

source = stream != null
source = stream != null && stream != Stream.Null && stream.CanRead && stream.Length > 0
? ImageSource.FromStream(async (token) => stream?.CanRead ?? true ? stream : (stream = await getStreamAsync(uriImageSource, token)))
: null;

Expand Down