Skip to content
Snippets Groups Projects
Commit e216f1c5 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -1158,19 +1158,10 @@ NewAccountModel::bestIdForAccount(const QString& accountID) ...@@ -1158,19 +1158,10 @@ NewAccountModel::bestIdForAccount(const QString& accountID)
// return empty string if duplicated with best name // return empty string if duplicated with best name
auto& accountInfo = getAccountInfo(accountID); auto& accountInfo = getAccountInfo(accountID);
auto alias = accountInfo.profileInfo.alias.simplified();
auto registeredName = accountInfo.registeredName.simplified(); auto registeredName = accountInfo.registeredName.simplified();
auto infoHash = accountInfo.profileInfo.uri.simplified(); auto infoHash = accountInfo.profileInfo.uri.simplified();
if (alias.isEmpty()) { return registeredName.isEmpty() ? infoHash : registeredName;
if (!registeredName.isEmpty())
return infoHash;
} else if (registeredName.isEmpty()) {
return infoHash;
} else if (registeredName != alias) {
return registeredName;
}
return QString();
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment