refactoring

This commit is contained in:
Paul Schneider 2016-10-07 14:31:12 +02:00
commit 3bdd2628e5
2 changed files with 1 additions and 2 deletions

View file

@ -12,11 +12,10 @@ namespace BookAStar.Helpers
public static ImageSource Avatar(string avatarPath)
{
var result = avatarPath == null ?
ImageSource.FromResource( "BookAStar.Images.icon_user.png") :
ImageSource.FromResource( "BookAStar.Images.Users.icon_user.png") :
avatarPath.StartsWith("res://") ?
ImageSource.FromResource(avatarPath.Substring(6)) :
ImageSource.FromUri(new Uri(avatarPath));
var test = ImageSource.FromResource("none.resource.png");
return result;
}

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After