mirror of
https://github.com/bitwarden/mobile
synced 2025-12-11 05:43:30 +00:00
run subscribed messages on main thread
This commit is contained in:
@@ -46,14 +46,17 @@ namespace Bit.App.Pages
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
_broadcasterService.Subscribe(nameof(TwoFactorPage), async (message) =>
|
||||
_broadcasterService.Subscribe(nameof(TwoFactorPage), (message) =>
|
||||
{
|
||||
if(message.Command == "gotYubiKeyOTP")
|
||||
{
|
||||
if(_vm.YubikeyMethod)
|
||||
{
|
||||
_vm.Token = (string)message.Data;
|
||||
await _vm.SubmitAsync();
|
||||
Device.BeginInvokeOnMainThread(async () =>
|
||||
{
|
||||
_vm.Token = (string)message.Data;
|
||||
await _vm.SubmitAsync();
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(message.Command == "resumeYubiKey")
|
||||
|
||||
Reference in New Issue
Block a user