From b5d2a9a2fb5287a060cb467a2b34d23f6e95521c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 31 May 2019 12:14:25 -0400 Subject: [PATCH] return command for folders add/edit --- src/App/Pages/Settings/FolderAddEditPage.xaml | 4 +++- src/App/Pages/Settings/FolderAddEditPageViewModel.cs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Settings/FolderAddEditPage.xaml b/src/App/Pages/Settings/FolderAddEditPage.xaml index ac1dfcd4a..00bd81f7e 100644 --- a/src/App/Pages/Settings/FolderAddEditPage.xaml +++ b/src/App/Pages/Settings/FolderAddEditPage.xaml @@ -31,7 +31,9 @@ + x:Name="_nameEntry" + ReturnType="Go" + ReturnCommand="{Binding SubmitCommand}" /> diff --git a/src/App/Pages/Settings/FolderAddEditPageViewModel.cs b/src/App/Pages/Settings/FolderAddEditPageViewModel.cs index 4350a307a..3b90300b4 100644 --- a/src/App/Pages/Settings/FolderAddEditPageViewModel.cs +++ b/src/App/Pages/Settings/FolderAddEditPageViewModel.cs @@ -5,6 +5,7 @@ using Bit.Core.Exceptions; using Bit.Core.Models.View; using Bit.Core.Utilities; using System.Threading.Tasks; +using Xamarin.Forms; namespace Bit.App.Pages { @@ -20,8 +21,11 @@ namespace Bit.App.Pages _deviceActionService = ServiceContainer.Resolve("deviceActionService"); _folderService = ServiceContainer.Resolve("folderService"); _platformUtilsService = ServiceContainer.Resolve("platformUtilsService"); + + SubmitCommand = new Command(async () => await SubmitAsync()); } + public Command SubmitCommand { get; } public string FolderId { get; set; } public FolderView Folder {