diff options
| author | Andrew Branson <andrew.branson@jolla.com> | 2026-02-10 23:16:37 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@jolla.com> | 2026-02-10 23:16:37 +0100 |
| commit | 69628390815254297bbd8c95436f6780fa846fae (patch) | |
| tree | df6114043e489bf5d767ac39f0d20636e12cf3a2 /settings/accounts/ui/mastodon-settings.qml | |
| parent | ff1c2efe40bf53c146b4a2e3b5046ae8ecb32264 (diff) | |
Translations fixed and other stuff
Diffstat (limited to 'settings/accounts/ui/mastodon-settings.qml')
| -rw-r--r-- | settings/accounts/ui/mastodon-settings.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/settings/accounts/ui/mastodon-settings.qml b/settings/accounts/ui/mastodon-settings.qml index 630f51d..6b25bb3 100644 --- a/settings/accounts/ui/mastodon-settings.qml +++ b/settings/accounts/ui/mastodon-settings.qml @@ -13,7 +13,18 @@ AccountSettingsAgent { if (credentialsUserName.length > 0) { return credentialsUserName } - return account.displayName + var displayName = account.displayName ? account.displayName.toString().trim() : "" + if (displayName.length > 0) { + return displayName + } + var apiHost = account.configurationValues("")["api/Host"] + var host = apiHost ? apiHost.toString().trim() : "" + host = host.replace(/^https?:\/\//i, "") + var pathSeparator = host.indexOf("/") + if (pathSeparator !== -1) { + host = host.substring(0, pathSeparator) + } + return host } Account { |
