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