1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

[PM-6506] Fix double execution of command on returnType Go (#3039)

* [PM-6506] Fix double execution of command on returnType Go

* [PM-6506] Hide keyboard on environment page close

* [PM-6506] Task guard

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
This commit is contained in:
André Bispo
2024-02-28 17:49:46 +00:00
committed by GitHub
parent c9fdfa7a15
commit 4e0a18cce5
5 changed files with 30 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ using Bit.iOS.Core.Views;
using Bit.iOS.Extension.Models;
using CoreNFC;
using Foundation;
using Microsoft.Maui.ApplicationModel;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Platform;
using MobileCoreServices;
@@ -528,7 +529,11 @@ namespace Bit.iOS.Extension
ThemeManager.ApplyResourcesTo(environmentPage);
if (environmentPage.BindingContext is EnvironmentPageViewModel vm)
{
vm.SubmitSuccessAction = () => DismissViewController(false, () => LaunchHomePage());
vm.SubmitSuccessTask = async () =>
{
await DismissViewControllerAsync(false);
await MainThread.InvokeOnMainThreadAsync(() => LaunchHomePage());
};
vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
}