mirror of
https://github.com/bitwarden/mobile
synced 2025-12-24 04:04:34 +00:00
Updated avatar color selection logic (#2151)
* updated avatar color selection logic * tweaks * more tweaks * formatting
This commit is contained in:
@@ -32,8 +32,9 @@ namespace Bit.iOS.Core.Utilities
|
||||
{
|
||||
throw new NullReferenceException(nameof(_stateService));
|
||||
}
|
||||
|
||||
var avatarImageSource = new AvatarImageSource(await _stateService.GetNameAsync(), await _stateService.GetEmailAsync());
|
||||
|
||||
var avatarImageSource = new AvatarImageSource(await _stateService.GetActiveUserIdAsync(),
|
||||
await _stateService.GetNameAsync(), await _stateService.GetEmailAsync());
|
||||
using (var avatarUIImage = await avatarImageSource.GetNativeImageAsync())
|
||||
{
|
||||
return avatarUIImage?.ImageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal) ?? UIImage.GetSystemImage(DEFAULT_SYSTEM_AVATAR_IMAGE);
|
||||
|
||||
Reference in New Issue
Block a user