Fix username displaying for comments

This commit is contained in:
krawieck 2020-08-31 13:39:27 +02:00
parent cf3862d2e2
commit 663d4bb913
1 changed files with 10 additions and 0 deletions

View File

@ -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(