From dfa85c60ea918bd64e85094392eeb735873827e5 Mon Sep 17 00:00:00 2001 From: Iliyan Germanov Date: Fri, 5 Nov 2021 17:15:37 +0200 Subject: [PATCH] Implement support for changing name when you're logged in with Google --- .../java/com/ivy/wallet/ui/settings/SettingsScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/ivy/wallet/ui/settings/SettingsScreen.kt b/app/src/main/java/com/ivy/wallet/ui/settings/SettingsScreen.kt index 6f925c1f6..75bd0abf2 100644 --- a/app/src/main/java/com/ivy/wallet/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/com/ivy/wallet/ui/settings/SettingsScreen.kt @@ -181,9 +181,7 @@ private fun BoxWithConstraintsScope.UI( onLogout = onLogout, onLogin = onLogin, ) { - if (user == null) { - nameModalVisible = true - } + nameModalVisible = true } Spacer(Modifier.height(20.dp)) @@ -479,6 +477,7 @@ private fun AccountCard( if (user != null) { AccountCardUser( + localName = nameLocalAccount, user = user, opSync = opSync, onSync = onSync @@ -494,6 +493,7 @@ private fun AccountCard( @Composable private fun AccountCardUser( + localName: String?, user: User, opSync: OpResult?, @@ -520,7 +520,7 @@ private fun AccountCardUser( } Text( - text = user.names(), + text = localName ?: user.names(), style = Typo.body2.style( fontWeight = FontWeight.ExtraBold, color = IvyTheme.colors.pureInverse