From 37208571fe4dcdbf906ddabb10ae44e85831f400 Mon Sep 17 00:00:00 2001 From: Dinis Vieira Date: Wed, 7 Feb 2024 19:08:51 +0000 Subject: [PATCH] [PM-5907] Fix for incorrect TOTP white text color on label when using light theme on iOS (#2982) * PM-5907 workaround for incorrect textcolor when programmatically changing text on Entry * Update src/Core/Pages/Vault/CipherAddEditPage.xaml.cs Co-authored-by: Federico Maccaroni --------- Co-authored-by: Federico Maccaroni --- src/Core/Pages/Vault/CipherAddEditPage.xaml.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Core/Pages/Vault/CipherAddEditPage.xaml.cs b/src/Core/Pages/Vault/CipherAddEditPage.xaml.cs index 1ff0be66c..2aa659d1b 100644 --- a/src/Core/Pages/Vault/CipherAddEditPage.xaml.cs +++ b/src/Core/Pages/Vault/CipherAddEditPage.xaml.cs @@ -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) {