1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 07:13:33 +00:00

fix for lock & logout message parsing issue (#1832)

This commit is contained in:
Matt Portune
2022-03-08 14:26:35 -05:00
committed by GitHub
parent fd74164f82
commit c043528a16
2 changed files with 14 additions and 11 deletions

View File

@@ -73,8 +73,9 @@ namespace Bit.App
}
else if (message.Command == "locked")
{
var (userId, userInitiated) =
message.Data as Tuple<string, bool> ?? new Tuple<string, bool>(null, false);
var extras = message.Data as Tuple<string, bool>;
var userId = extras?.Item1;
var userInitiated = extras?.Item2 ?? false;
Device.BeginInvokeOnMainThread(async () => await LockedAsync(userId, userInitiated));
}
else if (message.Command == "lockVault")
@@ -83,8 +84,10 @@ namespace Bit.App
}
else if (message.Command == "logout")
{
var (userId, userInitiated, expired) =
message.Data as Tuple<string, bool, bool> ?? new Tuple<string, bool, bool>(null, true, false);
var extras = message.Data as Tuple<string, bool, bool>;
var userId = extras?.Item1;
var userInitiated = extras?.Item2 ?? true;
var expired = extras?.Item3 ?? false;
Device.BeginInvokeOnMainThread(async () => await LogOutAsync(userId, userInitiated, expired));
}
else if (message.Command == "loggedOut")