1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +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,5 +1,4 @@
using Bit.App.Abstractions;
using Bit.App.Pages;
using Bit.App.Pages;
using Bit.App.Utilities;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
@@ -13,7 +12,7 @@ namespace Bit.iOS.Core.Handlers
public partial class CustomTabbedHandler : TabbedRenderer
{
private IBroadcasterService _broadcasterService;
private UITabBarItem _previousSelectedItem;
private UITabBarItem? _previousSelectedItem;
public CustomTabbedHandler()
{
@@ -73,8 +72,7 @@ namespace Bit.iOS.Core.Handlers
private void UpdateTabBarAppearance()
{
// https://developer.apple.com/forums/thread/682420
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
if (deviceActionService.SystemMajorVersion() >= 15)
if (UIDevice.CurrentDevice.CheckSystemVersion(15,0))
{
var appearance = new UITabBarAppearance();
appearance.ConfigureWithOpaqueBackground();