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:
parent
09eee940cd
commit
c2410e0a65
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user