From ace503ad3d8c9531bc29a0d6d65f4ae59aedf30f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 23 Jan 2022 11:06:23 -0500 Subject: [PATCH] Use username on compose screen when there is no display name --- Tusker/Views/AccountDisplayNameLabel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tusker/Views/AccountDisplayNameLabel.swift b/Tusker/Views/AccountDisplayNameLabel.swift index 2c368c44..2292be56 100644 --- a/Tusker/Views/AccountDisplayNameLabel.swift +++ b/Tusker/Views/AccountDisplayNameLabel.swift @@ -20,7 +20,8 @@ struct AccountDisplayNameLabel: 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 {