Skip to content

Commit

Permalink
Implement support for changing name when you're logged in with Google
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliyan Germanov committed Nov 5, 2021
1 parent 44de3b5 commit dfa85c6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ private fun BoxWithConstraintsScope.UI(
onLogout = onLogout,
onLogin = onLogin,
) {
if (user == null) {
nameModalVisible = true
}
nameModalVisible = true
}

Spacer(Modifier.height(20.dp))
Expand Down Expand Up @@ -479,6 +477,7 @@ private fun AccountCard(

if (user != null) {
AccountCardUser(
localName = nameLocalAccount,
user = user,
opSync = opSync,
onSync = onSync
Expand All @@ -494,6 +493,7 @@ private fun AccountCard(

@Composable
private fun AccountCardUser(
localName: String?,
user: User,
opSync: OpResult<Boolean>?,

Expand All @@ -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
Expand Down

0 comments on commit dfa85c6

Please sign in to comment.