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 committed Apr 7, 2021
1 parent 63fbc0f commit 67a638d
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 67a638d

Please sign in to comment.