1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(name): Clear alias on name change so that name changes are visible

Temporary work around for #5013
This commit is contained in:
Anthony Bilinski 2018-03-18 13:00:06 -07:00
parent 09eee940cd
commit c2410e0a65
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -52,6 +52,11 @@ void Friend::setName(const QString& _name)
// save old displayed name to be able to compare for changes
const auto oldDisplayed = getDisplayedName();
if (userName == userAlias) {
userAlias.clear(); // Because userAlias was set on name change before (issue #5013)
// we clear alias if equal to old name so that name change is visible.
// TODO: We should not modify alias on setName.
}
if (userName != name) {
userName = name;
emit nameChanged(friendId, name);