refactoring
This commit is contained in:
parent
683233b8f8
commit
3bdd2628e5
2 changed files with 1 additions and 2 deletions
|
|
@ -12,11 +12,10 @@ namespace BookAStar.Helpers
|
||||||
public static ImageSource Avatar(string avatarPath)
|
public static ImageSource Avatar(string avatarPath)
|
||||||
{
|
{
|
||||||
var result = avatarPath == null ?
|
var result = avatarPath == null ?
|
||||||
ImageSource.FromResource( "BookAStar.Images.icon_user.png") :
|
ImageSource.FromResource( "BookAStar.Images.Users.icon_user.png") :
|
||||||
avatarPath.StartsWith("res://") ?
|
avatarPath.StartsWith("res://") ?
|
||||||
ImageSource.FromResource(avatarPath.Substring(6)) :
|
ImageSource.FromResource(avatarPath.Substring(6)) :
|
||||||
ImageSource.FromUri(new Uri(avatarPath));
|
ImageSource.FromUri(new Uri(avatarPath));
|
||||||
var test = ImageSource.FromResource("none.resource.png");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue