Skip to content

Commit

Permalink
Show only account name among account name and account email in Accoun…
Browse files Browse the repository at this point in the history
…tView if account name and account email is identical
  • Loading branch information
shamim-emon committed Jan 18, 2025
1 parent fb561e3 commit 784058e
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import app.k9mail.core.ui.compose.designsystem.atom.text.TextBodyMedium
import app.k9mail.core.ui.compose.theme2.MainTheme
import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount

@Suppress("LongMethod")
@Composable
internal fun AccountView(
account: DisplayAccount,
Expand Down Expand Up @@ -78,10 +79,12 @@ internal fun AccountView(
text = account.name,
color = MainTheme.colors.onSurface,
)
TextBodyMedium(
text = account.email,
color = MainTheme.colors.onSurfaceVariant,
)
if (account.name != account.email) {
TextBodyMedium(
text = account.email,
color = MainTheme.colors.onSurfaceVariant,
)
}
}
}
}
Expand Down

0 comments on commit 784058e

Please sign in to comment.