Skip to content

Commit

Permalink
Remove unnecessary local variable.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <hello@camila.codes>
  • Loading branch information
Camila authored and allexzander committed Apr 8, 2021
1 parent 29f4a38 commit 1ca0ea4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/gui/userstatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, int stat
const auto retrievedData = json.object().value("ocs").toObject().value("data").toObject(defaultValues);
const auto emoji = retrievedData.value("icon").toString();
const auto message = retrievedData.value("message").toString();
auto statusString = retrievedData.value("status").toString();

_status = stringToEnum(statusString);
statusString = enumToString(_status);
const auto visibleStatusText = message.isEmpty() ? statusString : message;

_status = stringToEnum(retrievedData.value("status").toString());
const auto visibleStatusText = message.isEmpty() ? enumToString(_status) : message;

_message = QString("%1 %2").arg(emoji, visibleStatusText);
emit fetchUserStatusFinished();
Expand Down

0 comments on commit 1ca0ea4

Please sign in to comment.