summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-15 03:58:09 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-15 03:58:09 (GMT)
commit2aa483e0a2c142f46033f2f2a5285ff436afa957 (patch)
tree6f5c1ddf16f2b205eb85f30064b4fa8f4b685f07 /src
parent6b68c04cd613847e4f2bbe1f0cd8a2a13a9d4660 (diff)
downloadpowder-2aa483e0a2c142f46033f2f2a5285ff436afa957.zip
powder-2aa483e0a2c142f46033f2f2a5285ff436afa957.tar.gz
fix gravatars not showing for moderators
Diffstat (limited to 'src')
-rw-r--r--src/client/Client.cpp4
-rw-r--r--src/preview/Comment.h9
-rw-r--r--src/preview/PreviewView.cpp4
3 files changed, 10 insertions, 7 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp
index ecb6466..a43c45b 100644
--- a/src/client/Client.cpp
+++ b/src/client/Client.cpp
@@ -1725,12 +1725,14 @@ std::vector<SaveComment*> * Client::GetComments(int saveID, int start, int count
for(int j = 0; j < commentsArray.Size(); j++)
{
json::Number tempUserID = commentsArray[j]["UserID"];
- json::String tempUsername = commentsArray[j]["FormattedUsername"];
+ json::String tempUsername = commentsArray[j]["Username"];
+ json::String tempFormattedUsername = commentsArray[j]["FormattedUsername"];
json::String tempComment = commentsArray[j]["Text"];
commentArray->push_back(
new SaveComment(
tempUserID.Value(),
tempUsername.Value(),
+ tempFormattedUsername.Value(),
tempComment.Value()
)
);
diff --git a/src/preview/Comment.h b/src/preview/Comment.h
index 4bf7acb..1d84042 100644
--- a/src/preview/Comment.h
+++ b/src/preview/Comment.h
@@ -8,17 +8,18 @@ class SaveComment
public:
int authorID;
std::string authorName;
+ std::string authorNameFormatted;
std::string comment;
- SaveComment(int userID, std::string username, std::string commentText):
- authorID(userID), authorName(username), comment(commentText)
+ SaveComment(int userID, std::string username, std::string usernameFormatted, std::string commentText):
+ authorID(userID), authorName(username), authorNameFormatted(usernameFormatted), comment(commentText)
{
}
SaveComment(const SaveComment & comment):
- authorID(comment.authorID), authorName(comment.authorName), comment(comment.comment)
+ authorID(comment.authorID), authorName(comment.authorName), authorNameFormatted(comment.authorNameFormatted), comment(comment.comment)
{
}
SaveComment(const SaveComment * comment):
- authorID(comment->authorID), authorName(comment->authorName), comment(comment->comment)
+ authorID(comment->authorID), authorName(comment->authorName), authorNameFormatted(comment->authorNameFormatted), comment(comment->comment)
{
}
};
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp
index 5b9ea9b..0e871d3 100644
--- a/src/preview/PreviewView.cpp
+++ b/src/preview/PreviewView.cpp
@@ -549,9 +549,9 @@ void PreviewView::NotifyCommentsChanged(PreviewModel * sender)
}
if(showAvatars)
- tempUsername = new ui::Label(ui::Point(31, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorName);
+ tempUsername = new ui::Label(ui::Point(31, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorNameFormatted);
else
- tempUsername = new ui::Label(ui::Point(5, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorName);
+ tempUsername = new ui::Label(ui::Point(5, currentY+3), ui::Point(Size.X-((XRES/2) + 13), 16), comments->at(i)->authorNameFormatted);
tempUsername->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
tempUsername->Appearance.VerticalAlign = ui::Appearance::AlignBottom;
currentY += 16;