Fix username displaying for comments
This commit is contained in:
parent
cf3862d2e2
commit
663d4bb913
|
@ -14,6 +14,16 @@ class CommentWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var comment = commentTree.comment;
|
||||
|
||||
// decide which username to use
|
||||
var username;
|
||||
if (comment.creatorPreferredUsername != null &&
|
||||
comment.creatorPreferredUsername != '') {
|
||||
username = comment.creatorPreferredUsername;
|
||||
} else {
|
||||
username = '@${comment.creatorName}';
|
||||
}
|
||||
|
||||
var body;
|
||||
if (comment.deleted) {
|
||||
body = Flexible(
|
||||
|
|
Loading…
Reference in New Issue