mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
messages for credential store
This commit is contained in:
parent
fbce0be457
commit
197683b722
2 changed files with 31 additions and 25 deletions
|
@ -260,6 +260,7 @@ namespace Bit.App.Services
|
||||||
|
|
||||||
_googleAnalyticsService.TrackAppEvent("LoggedOut");
|
_googleAnalyticsService.TrackAppEvent("LoggedOut");
|
||||||
|
|
||||||
|
MessagingCenter.Send(Application.Current, "LoggedOut");
|
||||||
Device.BeginInvokeOnMainThread(() => Application.Current.MainPage = new ExtendedNavigationPage(new HomePage()));
|
Device.BeginInvokeOnMainThread(() => Application.Current.MainPage = new ExtendedNavigationPage(new HomePage()));
|
||||||
if(!string.IsNullOrWhiteSpace(logoutMessage))
|
if(!string.IsNullOrWhiteSpace(logoutMessage))
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,52 +112,57 @@ namespace Bit.iOS
|
||||||
modal.PresentViewController(activityViewController, true, null);
|
modal.PresentViewController(activityViewController, true, null);
|
||||||
});
|
});
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(Xamarin.Forms.Application.Current,
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(
|
||||||
"ListenYubiKeyOTP", (sender, listen) =>
|
Xamarin.Forms.Application.Current, "ListenYubiKeyOTP", (sender, listen) =>
|
||||||
|
{
|
||||||
|
if(_deviceInfoService.NfcEnabled)
|
||||||
{
|
{
|
||||||
if(_deviceInfoService.NfcEnabled)
|
_nfcSession?.InvalidateSession();
|
||||||
|
_nfcSession?.Dispose();
|
||||||
|
_nfcSession = null;
|
||||||
|
if(listen)
|
||||||
{
|
{
|
||||||
_nfcSession?.InvalidateSession();
|
_nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true);
|
||||||
_nfcSession?.Dispose();
|
_nfcSession.AlertMessage = AppResources.HoldYubikeyNearTop;
|
||||||
_nfcSession = null;
|
_nfcSession.BeginSession();
|
||||||
if(listen)
|
|
||||||
{
|
|
||||||
_nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true);
|
|
||||||
_nfcSession.AlertMessage = AppResources.HoldYubikeyNearTop;
|
|
||||||
_nfcSession.BeginSession();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
UIApplication.SharedApplication.StatusBarHidden = false;
|
UIApplication.SharedApplication.StatusBarHidden = false;
|
||||||
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent;
|
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent;
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(Xamarin.Forms.Application.Current,
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(
|
||||||
"ShowStatusBar", (sender, show) =>
|
Xamarin.Forms.Application.Current, "ShowStatusBar", (sender, show) =>
|
||||||
{
|
{
|
||||||
UIApplication.SharedApplication.SetStatusBarHidden(!show, false);
|
UIApplication.SharedApplication.SetStatusBarHidden(!show, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(Xamarin.Forms.Application.Current,
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(
|
||||||
"FullSyncCompleted", (sender, successfully) =>
|
Xamarin.Forms.Application.Current, "FullSyncCompleted", (sender, successfully) =>
|
||||||
{
|
{
|
||||||
if(successfully)
|
if(successfully)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, string>(Xamarin.Forms.Application.Current,
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, string>(
|
||||||
"UpsertedCipher", (sender, id) =>
|
Xamarin.Forms.Application.Current, "UpsertedCipher", (sender, id) =>
|
||||||
{
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, string>(
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, string>(Xamarin.Forms.Application.Current,
|
Xamarin.Forms.Application.Current, "DeletedCipher", (sender, id) =>
|
||||||
"DeletedCipher", (sender, id) =>
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
MessagingCenter.Subscribe<Xamarin.Forms.Application>(
|
||||||
|
Xamarin.Forms.Application.Current, "LoggedOut", (sender) =>
|
||||||
|
{
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ZXing.Net.Mobile.Forms.iOS.Platform.Init();
|
ZXing.Net.Mobile.Forms.iOS.Platform.Init();
|
||||||
|
|
Loading…
Reference in a new issue