Skip to content

Add email into comment entities to be displayed alongside comments - #14

Open
sharmkn wants to merge 8 commits into
masterfrom
dev/libraries-2
Open

Add email into comment entities to be displayed alongside comments#14
sharmkn wants to merge 8 commits into
masterfrom
dev/libraries-2

Conversation

@sharmkn

@sharmkn sharmkn commented Dec 23, 2020

Copy link
Copy Markdown
Owner

No description provided.

String image = (String) entity.getProperty("image");
String comment = username + " (" + email + ") said:"
+ "\n" + "\"" + text + "\"\n";
+ "\n" + "\"" + text + "\"\n" + "<br/> <img src=\"" + image + "\" /> <br/>";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually it's not recommended to append many strings. It is not much readable.

Consider using String.format("%s (%s) said: \n"%s"
<img src="%s"/>
", username, email, text, image);

(It's not quite clear either, but should be slightly better).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants