diff --git a/src/App/Pages/Accounts/EnvironmentPage.xaml.cs b/src/App/Pages/Accounts/EnvironmentPage.xaml.cs
index 3b70d65c3..ca9d0021c 100644
--- a/src/App/Pages/Accounts/EnvironmentPage.xaml.cs
+++ b/src/App/Pages/Accounts/EnvironmentPage.xaml.cs
@@ -15,7 +15,10 @@ namespace Bit.App.Pages
private async void Submit_Clicked(object sender, EventArgs e)
{
- await _vm.SubmitAsync();
+ if(DoOnce())
+ {
+ await _vm.SubmitAsync();
+ }
}
}
}
diff --git a/src/App/Pages/Accounts/HintPage.xaml b/src/App/Pages/Accounts/HintPage.xaml
index 2557b4856..1e9aaac1d 100644
--- a/src/App/Pages/Accounts/HintPage.xaml
+++ b/src/App/Pages/Accounts/HintPage.xaml
@@ -23,7 +23,6 @@
Text="{u:I18n EmailAddress}"
StyleClass="box-label" />
diff --git a/src/App/Pages/Accounts/HintPage.xaml.cs b/src/App/Pages/Accounts/HintPage.xaml.cs
index 3161ebe7c..05cc97ed4 100644
--- a/src/App/Pages/Accounts/HintPage.xaml.cs
+++ b/src/App/Pages/Accounts/HintPage.xaml.cs
@@ -13,15 +13,12 @@ namespace Bit.App.Pages
_vm.Page = this;
}
- protected override void OnAppearing()
- {
- base.OnAppearing();
- RequestFocus(_email);
- }
-
private async void Submit_Clicked(object sender, EventArgs e)
{
- await _vm.SubmitAsync();
+ if(DoOnce())
+ {
+ await _vm.SubmitAsync();
+ }
}
}
}
diff --git a/src/App/Pages/Accounts/HomePage.xaml b/src/App/Pages/Accounts/HomePage.xaml
index b365c5956..a4aa96d03 100644
--- a/src/App/Pages/Accounts/HomePage.xaml
+++ b/src/App/Pages/Accounts/HomePage.xaml
@@ -1,5 +1,5 @@
-
-
+
diff --git a/src/App/Pages/Accounts/HomePage.xaml.cs b/src/App/Pages/Accounts/HomePage.xaml.cs
index ad50b53b9..20bdfde65 100644
--- a/src/App/Pages/Accounts/HomePage.xaml.cs
+++ b/src/App/Pages/Accounts/HomePage.xaml.cs
@@ -3,7 +3,7 @@ using Xamarin.Forms;
namespace Bit.App.Pages
{
- public partial class HomePage : ContentPage
+ public partial class HomePage : BaseContentPage
{
public HomePage()
{
@@ -12,17 +12,26 @@ namespace Bit.App.Pages
private void LogIn_Clicked(object sender, EventArgs e)
{
- Navigation.PushModalAsync(new NavigationPage(new LoginPage()));
+ if(DoOnce())
+ {
+ Navigation.PushModalAsync(new NavigationPage(new LoginPage()));
+ }
}
private void Register_Clicked(object sender, EventArgs e)
{
- Navigation.PushModalAsync(new NavigationPage(new RegisterPage()));
+ if(DoOnce())
+ {
+ Navigation.PushModalAsync(new NavigationPage(new RegisterPage()));
+ }
}
private void Settings_Clicked(object sender, EventArgs e)
{
- Navigation.PushModalAsync(new NavigationPage(new EnvironmentPage()));
+ if(DoOnce())
+ {
+ Navigation.PushModalAsync(new NavigationPage(new EnvironmentPage()));
+ }
}
}
}
diff --git a/src/App/Pages/Accounts/LoginPage.xaml.cs b/src/App/Pages/Accounts/LoginPage.xaml.cs
index 8f3f4730d..bc1877279 100644
--- a/src/App/Pages/Accounts/LoginPage.xaml.cs
+++ b/src/App/Pages/Accounts/LoginPage.xaml.cs
@@ -33,12 +33,18 @@ namespace Bit.App.Pages
private async void LogIn_Clicked(object sender, EventArgs e)
{
- await _vm.LogInAsync();
+ if(DoOnce())
+ {
+ await _vm.LogInAsync();
+ }
}
private void Hint_Clicked(object sender, EventArgs e)
{
- Navigation.PushModalAsync(new NavigationPage(new HintPage()));
+ if(DoOnce())
+ {
+ Navigation.PushModalAsync(new NavigationPage(new HintPage()));
+ }
}
}
}
diff --git a/src/App/Pages/Accounts/LoginPageViewModel.cs b/src/App/Pages/Accounts/LoginPageViewModel.cs
index d5ecf031d..34c58541c 100644
--- a/src/App/Pages/Accounts/LoginPageViewModel.cs
+++ b/src/App/Pages/Accounts/LoginPageViewModel.cs
@@ -19,6 +19,7 @@ namespace Bit.App.Pages
private readonly IStorageService _storageService;
private bool _showPassword;
+ private string _email;
public LoginPageViewModel()
{
@@ -41,9 +42,14 @@ namespace Bit.App.Pages
});
}
+ public string Email
+ {
+ get => _email;
+ set => SetProperty(ref _email, value);
+ }
+
public Command TogglePasswordCommand { get; }
public string ShowPasswordIcon => ShowPassword ? "" : "";
- public string Email { get; set; }
public string MasterPassword { get; set; }
public bool RememberEmail { get; set; }
diff --git a/src/App/Pages/Accounts/RegisterPage.xaml.cs b/src/App/Pages/Accounts/RegisterPage.xaml.cs
index 1a79fdb37..e8ee996e3 100644
--- a/src/App/Pages/Accounts/RegisterPage.xaml.cs
+++ b/src/App/Pages/Accounts/RegisterPage.xaml.cs
@@ -19,7 +19,7 @@ namespace Bit.App.Pages
public Entry MasterPasswordEntry { get; set; }
public Entry ConfirmMasterPasswordEntry { get; set; }
- protected override async void OnAppearing()
+ protected override void OnAppearing()
{
base.OnAppearing();
RequestFocus(_email);
@@ -27,7 +27,10 @@ namespace Bit.App.Pages
private async void Submit_Clicked(object sender, EventArgs e)
{
- await _vm.SubmitAsync();
+ if(DoOnce())
+ {
+ await _vm.SubmitAsync();
+ }
}
}
}