1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-28 03:57:43 +02:00
bitwarden-mobile/src/App/Pages/Settings/SyncPage.xaml.cs

44 lines
996 B
C#
Raw Normal View History

2019-05-14 18:05:30 +02:00
using System;
2019-06-12 03:31:51 +02:00
using Xamarin.Forms;
2019-05-14 18:05:30 +02:00
namespace Bit.App.Pages
{
public partial class SyncPage : BaseContentPage
{
private readonly SyncPageViewModel _vm;
public SyncPage()
{
InitializeComponent();
_vm = BindingContext as SyncPageViewModel;
_vm.Page = this;
if (Device.RuntimePlatform == Device.Android)
2019-06-12 03:31:51 +02:00
{
ToolbarItems.RemoveAt(0);
}
2019-05-14 18:05:30 +02:00
}
2019-05-14 22:36:54 +02:00
protected async override void OnAppearing()
{
base.OnAppearing();
await _vm.InitAsync();
2019-05-14 22:36:54 +02:00
}
2019-05-14 18:05:30 +02:00
private async void Sync_Clicked(object sender, EventArgs e)
{
if (DoOnce())
2019-05-14 18:05:30 +02:00
{
await _vm.SyncAsync();
}
}
2019-06-12 03:31:51 +02:00
private async void Close_Clicked(object sender, System.EventArgs e)
{
if (DoOnce())
2019-06-12 03:31:51 +02:00
{
await Navigation.PopModalAsync();
}
}
2019-05-14 18:05:30 +02:00
}
}