mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03: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
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
Application.Current.MainPage = new TabsPage();
|
||||
Device.BeginInvokeOnMainThread(() => { Application.Current.MainPage = new TabsPage(); });
|
||||
}
|
||||
catch(ApiException e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue