mirror of
https://github.com/bitwarden/mobile
synced 2026-01-20 01:13:30 +00:00
Merge branch 'feature/maui-migration' into feature/maui-migration-passkeys
This commit is contained in:
@@ -181,6 +181,16 @@ namespace Bit.App.Pages
|
||||
|
||||
private void OnMaxAccessCountTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
var maxAccessEntry = (Microsoft.Maui.Controls.Entry)sender;
|
||||
|
||||
#if IOS
|
||||
// HACK: To avoid a bug that incorrectly sets the TextColor when changing text
|
||||
// programatically we need to set it to null and back to the correct color
|
||||
// MAUI issue https://github.com/dotnet/maui/pull/20100
|
||||
maxAccessEntry.TextColor = null;
|
||||
maxAccessEntry.TextColor = ThemeManager.GetResourceColor("TextColor");
|
||||
#endif
|
||||
|
||||
if (string.IsNullOrWhiteSpace(e.NewTextValue))
|
||||
{
|
||||
_vm.MaxAccessCount = null;
|
||||
@@ -190,7 +200,7 @@ namespace Bit.App.Pages
|
||||
// accept only digits
|
||||
if (!int.TryParse(e.NewTextValue, out int _))
|
||||
{
|
||||
((Microsoft.Maui.Controls.Entry)sender).Text = e.OldTextValue;
|
||||
maxAccessEntry.Text = e.OldTextValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,14 @@ namespace Bit.App.Pages
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
await _vm.UpdateTotpKeyAsync(key);
|
||||
|
||||
#if IOS
|
||||
// HACK: To avoid a bug that incorrectly sets the TextColor when changing text
|
||||
// programatically we need to set it to null and back to the correct color
|
||||
// MAUI issue https://github.com/dotnet/maui/pull/20100
|
||||
_loginTotpEntry.TextColor = null;
|
||||
_loginTotpEntry.TextColor = ThemeManager.GetResourceColor("TextColor");
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user