1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

secondary toolbar buttons

This commit is contained in:
Kyle Spearrin
2019-05-10 13:47:59 -04:00
parent 75cb67890d
commit 74c0e52458
5 changed files with 143 additions and 6 deletions

View File

@@ -36,6 +36,31 @@ namespace Bit.App.Pages
{
base.OnAppearing();
await LoadOnAppearedAsync(_scrollView, true, () => _vm.LoadAsync());
if(Device.RuntimePlatform == Device.Android)
{
if(_vm.Cipher.OrganizationId == null)
{
if(ToolbarItems.Contains(_collectionsItem))
{
ToolbarItems.Remove(_collectionsItem);
}
if(!ToolbarItems.Contains(_shareItem))
{
ToolbarItems.Insert(2, _shareItem);
}
}
else
{
if(ToolbarItems.Contains(_shareItem))
{
ToolbarItems.Remove(_shareItem);
}
if(!ToolbarItems.Contains(_collectionsItem))
{
ToolbarItems.Insert(2, _collectionsItem);
}
}
}
}
protected override void OnDisappearing()
@@ -93,5 +118,13 @@ namespace Bit.App.Pages
await _vm.DeleteAsync();
}
}
private void Collections_Clicked(object sender, System.EventArgs e)
{
if(DoOnce())
{
// TODO
}
}
}
}