1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-23 19:53:50 +00:00

PM-3349 PM-3350 Improved code safety with try...catch, better invoke on main thread and better null handling.

This commit is contained in:
Federico Maccaroni
2024-01-19 15:01:31 -03:00
parent 01ee1ff845
commit 4717f5e230
21 changed files with 612 additions and 377 deletions

View File

@@ -1,6 +1,7 @@
using Bit.App.Models;
using Bit.App.Utilities;
using Bit.Core.Enums;
using Bit.Core.Services;
namespace Bit.App.Pages
{
@@ -48,12 +49,20 @@ namespace Bit.App.Pages
private async Task LogInSuccessAsync()
{
if (AppHelpers.SetAlternateMainPage(_appOptions))
try
{
return;
if (AppHelpers.SetAlternateMainPage(_appOptions))
{
return;
}
var previousPage = await AppHelpers.ClearPreviousPage();
App.MainPage = new TabsPage(_appOptions, previousPage);
}
catch (Exception ex)
{
LoggerHelper.LogEvenIfCantBeResolved(ex);
throw;
}
var previousPage = await AppHelpers.ClearPreviousPage();
App.MainPage = new TabsPage(_appOptions, previousPage);
}
private async Task UpdateTempPasswordAsync()