Fix change current user name failed.

This commit is contained in:
sunwen
2024-05-06 17:44:21 +08:00
parent 29fea313ad
commit 6a48d60458
4 changed files with 11 additions and 1 deletions

View File

@@ -191,13 +191,14 @@ bool AccountFormDialog::updateReferenceData()
warn(tr("User Name can't be empty!"));
return false;
}
User::Current()->setUserName(mNewUserName);
}
if (!this->mCommentChanged) User::Current()->setUserName(mLeComment->text());
User::Current()->setUserName(mNewUserName);
bool ret = User::Current()->submitChange();
if (ret)
{
hideWarn();
EventCenter::Default()->triggerEvent(CurrentUserNameChanged, nullptr, nullptr);
LOG_USER_OPERATION("Change User Name")
}
else