mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
premium message on attachments edit page
This commit is contained in:
parent
aeb01ba292
commit
884521ced0
1 changed files with 14 additions and 2 deletions
|
@ -200,6 +200,16 @@ namespace Bit.App.Pages
|
||||||
ListView.ItemSelected += AttachmentSelected;
|
ListView.ItemSelected += AttachmentSelected;
|
||||||
await LoadAttachmentsAsync();
|
await LoadAttachmentsAsync();
|
||||||
|
|
||||||
|
// Prevent from adding multiple save buttons
|
||||||
|
if(Device.RuntimePlatform == Device.iOS && ToolbarItems.Count > 1)
|
||||||
|
{
|
||||||
|
ToolbarItems.RemoveAt(1);
|
||||||
|
}
|
||||||
|
else if(Device.RuntimePlatform != Device.iOS && ToolbarItems.Count > 0)
|
||||||
|
{
|
||||||
|
ToolbarItems.RemoveAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
if(_cipher != null && (_tokenService.TokenPremium || _cipher.OrganizationId != null))
|
if(_cipher != null && (_tokenService.TokenPremium || _cipher.OrganizationId != null))
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(SaveToolbarItem);
|
ToolbarItems.Add(SaveToolbarItem);
|
||||||
|
@ -210,8 +220,10 @@ namespace Bit.App.Pages
|
||||||
await ShowUpdateKeyAsync();
|
await ShowUpdateKeyAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// TODO: else show alert about needing premium membership
|
{
|
||||||
|
await DisplayAlert(null, AppResources.PremiumRequired, AppResources.Ok);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisappearing()
|
protected override void OnDisappearing()
|
||||||
|
|
Loading…
Reference in a new issue