Use username on compose screen when there is no display name

This commit is contained in:
Shadowfacts 2022-01-23 11:06:23 -05:00
parent e12a82b476
commit ace503ad3d
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ struct AccountDisplayNameLabel<Account: AccountProtocol>: View {
init(account: Account, fontSize: Int) {
self.account = account
self.fontSize = fontSize
self._text = State(initialValue: Text(verbatim: account.displayName))
let name = account.displayName.isEmpty ? account.username : account.displayName
self._text = State(initialValue: Text(verbatim: name))
}
var body: some View {