From 0aed13a2cfa9d976204772aabfa9dad417914135 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 11 Jun 2021 15:20:42 +0200 Subject: [PATCH] Fix selecting ciphers in search not working (#1426) --- src/App/Pages/Send/SendsPage.xaml.cs | 5 +++-- src/App/Pages/Vault/CiphersPage.xaml.cs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/App/Pages/Send/SendsPage.xaml.cs b/src/App/Pages/Send/SendsPage.xaml.cs index 11096d74b..ffffdfd6a 100644 --- a/src/App/Pages/Send/SendsPage.xaml.cs +++ b/src/App/Pages/Send/SendsPage.xaml.cs @@ -1,4 +1,5 @@ -using System; +using System; +using System.Linq; using Bit.App.Controls; using Bit.App.Resources; using Bit.Core.Models.View; @@ -96,7 +97,7 @@ namespace Bit.App.Pages return; } - if (e.CurrentSelection is SendView send) + if (e.CurrentSelection?.FirstOrDefault() is SendView send) { await _vm.SelectSendAsync(send); } diff --git a/src/App/Pages/Vault/CiphersPage.xaml.cs b/src/App/Pages/Vault/CiphersPage.xaml.cs index ea3357b44..c29ad69ea 100644 --- a/src/App/Pages/Vault/CiphersPage.xaml.cs +++ b/src/App/Pages/Vault/CiphersPage.xaml.cs @@ -3,6 +3,7 @@ using Bit.App.Resources; using Bit.Core.Models.View; using Bit.Core.Utilities; using System; +using System.Linq; using Bit.App.Controls; using Xamarin.Forms; @@ -128,7 +129,7 @@ namespace Bit.App.Pages return; } - if (e.CurrentSelection is CipherView cipher) + if (e.CurrentSelection?.FirstOrDefault() is CipherView cipher) { await _vm.SelectCipherAsync(cipher); }