Better post display

🐛 Fix realm with post
This commit is contained in:
2024-06-23 01:52:05 +08:00
parent 4144bb307e
commit bb67edd227
12 changed files with 271 additions and 210 deletions

View File

@ -75,8 +75,8 @@ class Post {
json["reply_to"] != null ? Post.fromJson(json["reply_to"]) : null,
repostTo:
json["repost_to"] != null ? Post.fromJson(json["repost_to"]) : null,
realm: json["realm"],
publishedAt: json["published_at"],
realm: json["realm"] != null ? Realm.fromJson(json["realm"]) : null,
publishedAt: json["published_at"] != null ? DateTime.parse(json["published_at"]) : null,
authorId: json["author_id"],
author: Account.fromJson(json["author"]),
replyCount: json["reply_count"],
@ -108,8 +108,8 @@ class Post {
"realm_id": realmId,
"reply_to": replyTo?.toJson(),
"repost_to": repostTo?.toJson(),
"realm": realm,
"published_at": publishedAt,
"realm": realm?.toJson(),
"published_at": publishedAt?.toIso8601String(),
"author_id": authorId,
"author": author.toJson(),
"reply_count": replyCount,