Commit e216f1c5 authored by Sébastien Blin's avatar Sébastien Blin

newaccountmodel: bestId must return username or hash

never show nothing. This fix the welcome page on client-qt

GitLab: #481
Change-Id: I7254fee67d67c55794146ee76169e58585e660df
parent c38e892b
......@@ -1158,19 +1158,10 @@ NewAccountModel::bestIdForAccount(const QString& accountID)
// return empty string if duplicated with best name
auto& accountInfo = getAccountInfo(accountID);
auto alias = accountInfo.profileInfo.alias.simplified();
auto registeredName = accountInfo.registeredName.simplified();
auto infoHash = accountInfo.profileInfo.uri.simplified();
if (alias.isEmpty()) {
if (!registeredName.isEmpty())
return infoHash;
} else if (registeredName.isEmpty()) {
return infoHash;
} else if (registeredName != alias) {
return registeredName;
return QString();
return registeredName.isEmpty() ? infoHash : registeredName;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment