mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
Make callbacks from UI thread. (#739)
The code expects to be called form UI thread, but it loks like JavaScript callbacks are not. Switch to UI thread when invoking a callback. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
This commit is contained in:
parent
d8e19415e3
commit
c2f2a5e52f
1 changed files with 3 additions and 3 deletions
|
@ -138,10 +138,10 @@ namespace Bit.App.Pages
|
|||
var host = WebUtility.UrlEncode(providerData["Host"] as string);
|
||||
var req = WebUtility.UrlEncode(providerData["Signature"] as string);
|
||||
page.DuoWebView.Uri = $"{_webVaultUrl}/duo-connector.html?host={host}&request={req}";
|
||||
page.DuoWebView.RegisterAction(async sig =>
|
||||
page.DuoWebView.RegisterAction(sig =>
|
||||
{
|
||||
Token = sig;
|
||||
await SubmitAsync();
|
||||
Device.BeginInvokeOnMainThread(async() => await SubmitAsync());
|
||||
});
|
||||
break;
|
||||
case TwoFactorProviderType.Email:
|
||||
|
@ -208,7 +208,7 @@ namespace Bit.App.Pages
|
|||
_broadcasterService.Unsubscribe(nameof(TwoFactorPage));
|
||||
var disableFavicon = await _storageService.GetAsync<bool?>(Constants.DisableFaviconKey);
|
||||
await _stateService.SaveAsync(Constants.DisableFaviconKey, disableFavicon.GetValueOrDefault());
|
||||
Device.BeginInvokeOnMainThread(() => { Application.Current.MainPage = new TabsPage(); });
|
||||
Application.Current.MainPage = new TabsPage();
|
||||
}
|
||||
catch(ApiException e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue