Permalink
Browse files

remove hardcoded op

  • Loading branch information...
jacob1 committed Feb 3, 2018
1 parent 25ef5b1 commit 3d66b7e2637f2b63c00830d75a4a593e13a69f83
Showing with 3 additions and 4 deletions.
  1. +1 −1 src/client/Client.cpp
  2. +1 −2 src/gui/game/GameView.cpp
  3. +1 −1 src/gui/preview/PreviewModel.cpp
@@ -1769,7 +1769,7 @@ RequestBroker::Request * Client::GetCommentsAsync(int saveID, int start, int cou
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
std::string username = commentsArray[j]["Username"].asString();
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
if (formattedUsername == "jacobot")
formattedUsername = "\bt" + formattedUsername;
std::string comment = commentsArray[j]["Text"].asString();
commentArray->push_back(new SaveComment(userID, username, formattedUsername, comment));
@@ -1491,8 +1491,7 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
break;
case 'a':
if ((Client::Ref().GetAuthUser().UserElevation == User::ElevationModerator
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin
|| Client::Ref().GetAuthUser().Username == "Mrprocom") && ctrl)
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin) && ctrl)
{
std::string authorString = Client::Ref().GetAuthorInfo().toStyledString();
new InformationMessage("Save authorship info", authorString, true);
@@ -271,7 +271,7 @@ bool PreviewModel::ParseComments(char *commentsResponse)
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
std::string username = commentsArray[j]["Username"].asString();
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
if (formattedUsername == "jacobot")
formattedUsername = "\bt" + formattedUsername;
std::string comment = commentsArray[j]["Text"].asString();
saveComments->push_back(new SaveComment(userID, username, formattedUsername, comment));

0 comments on commit 3d66b7e

Please sign in to comment.