1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-19 01:33:22 +00:00

Redid a few thigns on extension page with messaging. Added reanable button. Updated refresh icon to orange

This commit is contained in:
Kyle Spearrin
2016-07-04 23:11:44 -04:00
parent b1592bfd96
commit 84326811dd
6 changed files with 32 additions and 20 deletions

View File

@@ -23,6 +23,7 @@ using Bit.iOS.Core.Services;
using PushNotification.Plugin;
using Plugin.DeviceInfo;
using Plugin.Connectivity.Abstractions;
using Bit.App.Pages;
namespace Bit.iOS
{
@@ -52,7 +53,7 @@ namespace Bit.iOS
UINavigationBar.Appearance.ShadowImage = new UIImage();
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current, "ShowAppExtension", (sender) =>
MessagingCenter.Subscribe<Xamarin.Forms.Application, ToolsExtensionPage>(Xamarin.Forms.Application.Current, "ShowAppExtension", (sender, page) =>
{
var itemProvider = new NSItemProvider(new NSDictionary(), "com.8bit.bitwarden.extension-setup");
var extensionItem = new NSExtensionItem();
@@ -60,8 +61,7 @@ namespace Bit.iOS
var activityViewController = new UIActivityViewController(new NSExtensionItem[] { extensionItem }, null);
activityViewController.CompletionHandler = (activityType, completed) =>
{
MessagingCenter.Send(Xamarin.Forms.Application.Current, "EnabledAppExtension",
completed && activityType == "com.8bit.bitwarden.find-login-action-extension");
page.EnabledExtension(completed && activityType == "com.8bit.bitwarden.find-login-action-extension");
};
UIApplication.SharedApplication.KeyWindow.RootViewController.ModalViewController