1
0
Fork 0
mirror of https://github.com/bitwarden/android.git synced 2024-12-23 17:40:31 +03:00

App extension callout alert on first time visiting the add site screen in iOS.

This commit is contained in:
Kyle Spearrin 2016-08-25 00:23:24 -04:00
parent a4a7d2180c
commit 5ff9131910

View file

@ -9,16 +9,20 @@ using Bit.App.Resources;
using Plugin.Connectivity.Abstractions;
using Xamarin.Forms;
using XLabs.Ioc;
using Plugin.Settings.Abstractions;
namespace Bit.App.Pages
{
public class VaultAddSitePage : ExtendedContentPage
{
private const string AddedSiteAlertKey = "addedSiteAlert";
private readonly ISiteService _siteService;
private readonly IFolderService _folderService;
private readonly IUserDialogs _userDialogs;
private readonly IConnectivity _connectivity;
private readonly IGoogleAnalyticsService _googleAnalyticsService;
private readonly ISettings _settings;
public VaultAddSitePage()
{
@ -27,6 +31,7 @@ namespace Bit.App.Pages
_userDialogs = Resolver.Resolve<IUserDialogs>();
_connectivity = Resolver.Resolve<IConnectivity>();
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
_settings = Resolver.Resolve<ISettings>();
Init();
}
@ -171,6 +176,15 @@ namespace Bit.App.Pages
{
AlertNoConnection();
}
if(Device.OS == TargetPlatform.iOS && !_settings.GetValueOrDefault(AddedSiteAlertKey, false))
{
_settings.AddOrUpdateValue(AddedSiteAlertKey, true);
DisplayAlert("bitwarden App Extension",
"The easiest way to add new sites to your vault is from the bitwarden App Extension. " +
"Learn more about using the bitwarden App Extension by navigating to the \"Tools\" screen.",
AppResources.Ok);
}
}
private void GenerateCell_Tapped(object sender, EventArgs e)