bitwarden-android/src/App/Pages/Settings/OptionsPage.xaml.cs

46 lines
1.3 KiB
C#
Raw Normal View History

2019-05-30 06:02:30 +03:00
using Bit.App.Resources;
using System;
2019-06-02 07:08:20 +03:00
using System.Collections.Generic;
2019-05-29 21:11:15 +03:00
using Xamarin.Forms;
2019-05-29 16:08:47 +03:00
namespace Bit.App.Pages
{
public partial class OptionsPage : BaseContentPage
{
private readonly OptionsPageViewModel _vm;
public OptionsPage()
{
InitializeComponent();
_vm = BindingContext as OptionsPageViewModel;
_vm.Page = this;
2019-05-29 21:11:15 +03:00
_themePicker.ItemDisplayBinding = new Binding("Value");
_uriMatchPicker.ItemDisplayBinding = new Binding("Value");
_clearClipboardPicker.ItemDisplayBinding = new Binding("Value");
2019-05-30 06:02:30 +03:00
if(Device.RuntimePlatform == Device.Android)
{
2019-06-03 17:45:27 +03:00
_vm.AndroidOptions = true;
2019-05-30 06:02:30 +03:00
_themeDescriptionLabel.Text = string.Concat(_themeDescriptionLabel.Text, " ",
AppResources.RestartIsRequired);
}
2019-05-29 16:08:47 +03:00
}
2019-05-29 16:36:57 +03:00
protected async override void OnAppearing()
2019-05-29 16:08:47 +03:00
{
base.OnAppearing();
2019-05-29 16:36:57 +03:00
await _vm.InitAsync();
2019-05-29 16:08:47 +03:00
}
2019-06-03 17:45:27 +03:00
protected async override void OnDisappearing()
{
base.OnDisappearing();
await _vm.UpdateAutofillBlacklistedUris();
}
private async void BlacklistedUrisEditor_Unfocused(object sender, FocusEventArgs e)
{
await _vm.UpdateAutofillBlacklistedUris();
}
2019-05-29 16:08:47 +03:00
}
}