mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-13 11:54:04 +02:00
fix gravatars not showing for moderators
This commit is contained in:
@@ -1725,12 +1725,14 @@ std::vector<SaveComment*> * Client::GetComments(int saveID, int start, int count
|
|||||||
for(int j = 0; j < commentsArray.Size(); j++)
|
for(int j = 0; j < commentsArray.Size(); j++)
|
||||||
{
|
{
|
||||||
json::Number tempUserID = commentsArray[j]["UserID"];
|
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"];
|
json::String tempComment = commentsArray[j]["Text"];
|
||||||
commentArray->push_back(
|
commentArray->push_back(
|
||||||
new SaveComment(
|
new SaveComment(
|
||||||
tempUserID.Value(),
|
tempUserID.Value(),
|
||||||
tempUsername.Value(),
|
tempUsername.Value(),
|
||||||
|
tempFormattedUsername.Value(),
|
||||||
tempComment.Value()
|
tempComment.Value()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -8,17 +8,18 @@ class SaveComment
|
|||||||
public:
|
public:
|
||||||
int authorID;
|
int authorID;
|
||||||
std::string authorName;
|
std::string authorName;
|
||||||
|
std::string authorNameFormatted;
|
||||||
std::string comment;
|
std::string comment;
|
||||||
SaveComment(int userID, std::string username, std::string commentText):
|
SaveComment(int userID, std::string username, std::string usernameFormatted, std::string commentText):
|
||||||
authorID(userID), authorName(username), comment(commentText)
|
authorID(userID), authorName(username), authorNameFormatted(usernameFormatted), comment(commentText)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
SaveComment(const SaveComment & 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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
SaveComment(const SaveComment * 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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -549,9 +549,9 @@ void PreviewView::NotifyCommentsChanged(PreviewModel * sender)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(showAvatars)
|
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
|
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.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
tempUsername->Appearance.VerticalAlign = ui::Appearance::AlignBottom;
|
tempUsername->Appearance.VerticalAlign = ui::Appearance::AlignBottom;
|
||||||
currentY += 16;
|
currentY += 16;
|
||||||
|
Reference in New Issue
Block a user