forked from shadowfacts/Tusker
Use username on compose screen when there is no display name
This commit is contained in:
parent
e12a82b476
commit
ace503ad3d
|
@ -20,7 +20,8 @@ struct AccountDisplayNameLabel<Account: AccountProtocol>: View {
|
||||||
init(account: Account, fontSize: Int) {
|
init(account: Account, fontSize: Int) {
|
||||||
self.account = account
|
self.account = account
|
||||||
self.fontSize = fontSize
|
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 {
|
var body: some View {
|
||||||
|
|
Loading…
Reference in New Issue