1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-21 03:43:17 +00:00

PM-3349 PM-3350 MAUI Migration fix nullable exception bindings and AsyncCommand canExecute null exception

This commit is contained in:
Federico Maccaroni
2023-09-29 12:12:01 -03:00
parent 8ef9443b1e
commit b8f0747dd4
15 changed files with 136 additions and 121 deletions

View File

@@ -16,7 +16,7 @@ namespace Bit.App.Controls
FontFamily = "bwi-font";
break;
case Device.Android:
FontFamily = "bwi-font.ttf#bwi-font";
FontFamily = "bwi-font.ttf";
break;
}

View File

@@ -17,7 +17,7 @@ namespace Bit.App.Controls
FontFamily = "bwi-font";
break;
case Device.Android:
FontFamily = "bwi-font.ttf#bwi-font";
FontFamily = "bwi-font.ttf";
break;
}

View File

@@ -15,7 +15,7 @@ namespace Bit.App.Controls
FontFamily = "Material Icons";
break;
case Device.Android:
FontFamily = "MaterialIcons_Regular.ttf#Material Icons";
FontFamily = "MaterialIcons_Regular.ttf";
break;
}
}

View File

@@ -14,7 +14,7 @@ namespace Bit.App.Controls
FontFamily = "Material Icons";
break;
case Device.Android:
FontFamily = "MaterialIcons_Regular.ttf#Material Icons";
FontFamily = "MaterialIcons_Regular.ttf";
break;
}
}

View File

@@ -1,22 +1,14 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui;
namespace Bit.App.Controls
namespace Bit.App.Controls
{
public class MonoEntry : Entry
{
public MonoEntry()
{
// TODO Xamarin.Forms.Device.RuntimePlatform is no longer supported. Use Microsoft.Maui.Devices.DeviceInfo.Platform instead. For more details see https://learn.microsoft.com/en-us/dotnet/maui/migration/forms-projects#device-changes
switch (Device.RuntimePlatform)
{
case Device.iOS:
FontFamily = "Menlo-Regular";
break;
case Device.Android:
FontFamily = "RobotoMono_Regular.ttf#Roboto Mono";
break;
}
#if ANDROID
FontFamily = "RobotoMono_Regular";
#elif IOS
FontFamily = "Menlo-Regular";
#endif
}
}
}

View File

@@ -14,7 +14,7 @@ namespace Bit.App.Controls
FontFamily = "Menlo-Regular";
break;
case Device.Android:
FontFamily = "RobotoMono_Regular.ttf#Roboto Mono";
FontFamily = "RobotoMono_Regular.ttf";
break;
}
}