chore: clean up some of the pronoun implementation (#5583)

This commit is contained in:
pajlada
2024-09-08 13:30:06 +02:00
committed by GitHub
parent 9375bce555
commit 336536c761
9 changed files with 180 additions and 153 deletions
+5 -5
View File
@@ -962,19 +962,19 @@ void UserInfoPopup::updateUserData()
// get pronouns
if (getSettings()->showPronouns)
{
getApp()->getPronouns()->fetch(
getApp()->getPronouns()->getUserPronoun(
user.login,
[this, hack](const auto pronouns) {
[this, hack](const auto userPronoun) {
runInGuiThread([this, hack,
pronouns = std::move(pronouns)]() {
userPronoun = std::move(userPronoun)]() {
if (!hack.lock() || this->ui_.pronounsLabel == nullptr)
{
return;
}
if (!pronouns.isUnspecified())
if (!userPronoun.isUnspecified())
{
this->ui_.pronounsLabel->setText(
TEXT_PRONOUNS.arg(pronouns.format()));
TEXT_PRONOUNS.arg(userPronoun.format()));
}
else
{