1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 00:33:20 +00:00

[EC-519] Refactor Split DeviceActionService (#2081)

* EC-519 Refactored IDeviceActionService to be split into IFileService and IAutofillManager also some cleanups were made

* EC-519 Fix format

* EC-519 Fix merge to use the new AutofillHandler
This commit is contained in:
Federico Maccaroni
2022-10-11 18:19:32 -03:00
committed by GitHub
parent d800e9a43e
commit ba677a96aa
35 changed files with 883 additions and 798 deletions

View File

@@ -1,5 +1,6 @@
using Bit.App.Abstractions;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration;
@@ -9,12 +10,12 @@ namespace Bit.App.Pages
{
public partial class OptionsPage : BaseContentPage
{
private readonly IDeviceActionService _deviceActionService;
private readonly IAutofillHandler _autofillHandler;
private readonly OptionsPageViewModel _vm;
public OptionsPage()
{
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
_autofillHandler = ServiceContainer.Resolve<IAutofillHandler>();
InitializeComponent();
_vm = BindingContext as OptionsPageViewModel;
_vm.Page = this;
@@ -25,7 +26,7 @@ namespace Bit.App.Pages
if (Device.RuntimePlatform == Device.Android)
{
ToolbarItems.RemoveAt(0);
_vm.ShowAndroidAutofillSettings = _deviceActionService.SupportsAutofillService();
_vm.ShowAndroidAutofillSettings = _autofillHandler.SupportsAutofillService();
}
else
{