1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-07 19:13:19 +00:00

autofill intent fixes

This commit is contained in:
Kyle Spearrin
2017-02-16 22:22:19 -05:00
parent 5bce95a686
commit be9db2930f
4 changed files with 18 additions and 44 deletions

View File

@@ -22,7 +22,6 @@ namespace Bit.App
private const string LastBuildKey = "LastBuild";
private string _uri;
private DateTime _lastMainPageSet = DateTime.MinValue;
private readonly IDatabaseService _databaseService;
private readonly IConnectivity _connectivity;
private readonly IUserDialogs _userDialogs;
@@ -93,11 +92,6 @@ namespace Bit.App
{
Logout(args);
});
MessagingCenter.Subscribe<Application>(Current, "SetMainPage", (sender) =>
{
SetMainPageFromAutofill();
});
}
protected async override void OnStart()
@@ -165,15 +159,14 @@ namespace Bit.App
{
if(Device.OS == TargetPlatform.Android && !string.IsNullOrWhiteSpace(_uri))
{
var now = DateTime.UtcNow;
if((now - _lastMainPageSet).Seconds <= 1)
Task.Run(() =>
{
return;
}
_lastMainPageSet = now;
Device.BeginInvokeOnMainThread(() => MainPage = new MainPage());
_uri = null;
Device.BeginInvokeOnMainThread(() =>
{
Current.MainPage = new MainPage();
_uri = null;
});
});
}
}