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
|
@ -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 New Issue