1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

set generator page from tile if locked

This commit is contained in:
Kyle Spearrin 2019-06-06 20:34:59 -04:00
parent a2bedaab8a
commit d5c610b819
6 changed files with 18 additions and 5 deletions

View File

@ -146,10 +146,18 @@ namespace Bit.Droid
if(intent.GetBooleanExtra("generatorTile", false))
{
_messagingService.Send("popAllAndGoToTabGenerator");
if(_appOptions != null)
{
_appOptions.GeneratorTile = true;
}
}
if(intent.GetBooleanExtra("myVaultTile", false))
{
_messagingService.Send("popAllAndGoToTabMyVault");
if(_appOptions != null)
{
_appOptions.MyVaultTile = true;
}
}
else
{

View File

@ -90,7 +90,7 @@ namespace Bit.App
else if(message.Command == "locked")
{
await _stateService.PurgeAsync();
var lockPage = new LockPage(null, !(message.Data as bool?).GetValueOrDefault());
var lockPage = new LockPage(_appOptions, !(message.Data as bool?).GetValueOrDefault());
Device.BeginInvokeOnMainThread(() => Current.MainPage = new NavigationPage(lockPage));
}
else if(message.Command == "lockVault")
@ -135,10 +135,12 @@ namespace Bit.App
}
if(message.Command == "popAllAndGoToTabMyVault")
{
_appOptions.MyVaultTile = false;
tabsPage.ResetToVaultPage();
}
else
{
_appOptions.GeneratorTile = false;
tabsPage.ResetToGeneratorPage();
}
}
@ -170,8 +172,8 @@ namespace Bit.App
{
await _storageService.SaveAsync(Constants.LastActiveKey, DateTime.UtcNow);
}
await HandleLockingAsync();
SetTabsPageFromAutofill();
await HandleLockingAsync();
}
protected async override void OnResume()

View File

@ -36,7 +36,7 @@ namespace Bit.App.Pages
return;
}
}
Application.Current.MainPage = new TabsPage();
Application.Current.MainPage = new TabsPage(_appOptions);
};
MasterPasswordEntry = _masterPassword;
PinEntry = _pin;

View File

@ -54,6 +54,10 @@ namespace Bit.App.Pages
appOptions.GeneratorTile = false;
ResetToGeneratorPage();
}
else if(appOptions?.MyVaultTile ?? false)
{
appOptions.MyVaultTile = false;
}
}
public void ResetToVaultPage()

View File

@ -483,7 +483,6 @@
<Editor
x:Name="_notesEditor"
Text="{Binding Cipher.Notes}"
AutoSize="TextChanges"
StyleClass="box-value" />
</StackLayout>
</StackLayout>

View File

@ -63,7 +63,7 @@ namespace Bit.App.Pages
{
return;
}
_vm.Search(e.NewTextValue, 1000);
_vm.Search(e.NewTextValue, 300);
}
private void SearchBar_SearchButtonPressed(object sender, EventArgs e)