mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-22 11:35:21 +01:00
Fix runtime exception. (#738)
In the callback the processing does not go in the main UI thread, so we need to switch there. Otherwise on Android this throws Android.Util.AndroidRuntimeException with detail “Only the original thread that created a view hierarchy can touch its views”. Discovered by trying to login with Duo as a two-factor login type. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
This commit is contained in:
parent
387dc2f59c
commit
d8e19415e3
@ -208,7 +208,7 @@ namespace Bit.App.Pages
|
|||||||
_broadcasterService.Unsubscribe(nameof(TwoFactorPage));
|
_broadcasterService.Unsubscribe(nameof(TwoFactorPage));
|
||||||
var disableFavicon = await _storageService.GetAsync<bool?>(Constants.DisableFaviconKey);
|
var disableFavicon = await _storageService.GetAsync<bool?>(Constants.DisableFaviconKey);
|
||||||
await _stateService.SaveAsync(Constants.DisableFaviconKey, disableFavicon.GetValueOrDefault());
|
await _stateService.SaveAsync(Constants.DisableFaviconKey, disableFavicon.GetValueOrDefault());
|
||||||
Application.Current.MainPage = new TabsPage();
|
Device.BeginInvokeOnMainThread(() => { Application.Current.MainPage = new TabsPage(); });
|
||||||
}
|
}
|
||||||
catch(ApiException e)
|
catch(ApiException e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user