From c1673a1bbfb20f5986d14e2a0bb4f61d3c0ee1ca Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Fri, 5 May 2023 18:18:07 +0200 Subject: [PATCH] PM-1352 Fix avatar toolbar item not loading on OTP cipher selection (#2507) --- src/App/Pages/Vault/CipherSelectionPage.xaml | 2 +- src/App/Pages/Vault/CipherSelectionPage.xaml.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/App/Pages/Vault/CipherSelectionPage.xaml b/src/App/Pages/Vault/CipherSelectionPage.xaml index 979392e3b..f5c8c0641 100644 --- a/src/App/Pages/Vault/CipherSelectionPage.xaml +++ b/src/App/Pages/Vault/CipherSelectionPage.xaml @@ -16,7 +16,7 @@ IconImageSource="{Binding AvatarImageSource}" Command="{Binding Source={x:Reference _accountListOverlay}, Path=ToggleVisibililtyCommand}" Order="Primary" - Priority="-2" + Priority="-1" UseOriginalImage="True" AutomationProperties.IsInAccessibleTree="True" AutomationProperties.Name="{u:I18n Account}" /> diff --git a/src/App/Pages/Vault/CipherSelectionPage.xaml.cs b/src/App/Pages/Vault/CipherSelectionPage.xaml.cs index 9d08d7d8a..4a9fc8625 100644 --- a/src/App/Pages/Vault/CipherSelectionPage.xaml.cs +++ b/src/App/Pages/Vault/CipherSelectionPage.xaml.cs @@ -69,14 +69,16 @@ namespace Bit.App.Pages return; } - // TODO: There's currently an issue on iOS where the toolbar item is not getting updated - // as the others somehow. Removing this so at least we get the circle with ".." instead - // of a white circle - if (Device.RuntimePlatform != Device.iOS) + try { + // don't crash the app if the avatar can't be loaded, just log the ex _accountAvatar?.OnAppearing(); _vm.AvatarImageSource = await GetAvatarImageSourceAsync(); } + catch (Exception ex) + { + LoggerHelper.LogEvenIfCantBeResolved(ex); + } _broadcasterService.Subscribe(nameof(CipherSelectionPage), async (message) => {