✨ Pinned post & Total vote counts
This commit is contained in:
@ -18,6 +18,7 @@ class Post {
|
||||
Post? repostTo;
|
||||
Realm? realm;
|
||||
DateTime? publishedAt;
|
||||
DateTime? pinnedAt;
|
||||
bool? isDraft;
|
||||
int authorId;
|
||||
Account author;
|
||||
@ -39,6 +40,7 @@ class Post {
|
||||
required this.repostTo,
|
||||
required this.realm,
|
||||
required this.publishedAt,
|
||||
required this.pinnedAt,
|
||||
required this.isDraft,
|
||||
required this.authorId,
|
||||
required this.author,
|
||||
@ -70,6 +72,9 @@ class Post {
|
||||
publishedAt: json['published_at'] != null
|
||||
? DateTime.parse(json['published_at'])
|
||||
: null,
|
||||
pinnedAt: json['pinned_at'] != null
|
||||
? DateTime.parse(json['pinned_at'])
|
||||
: null,
|
||||
isDraft: json['is_draft'],
|
||||
authorId: json['author_id'],
|
||||
author: Account.fromJson(json['author']),
|
||||
@ -93,6 +98,7 @@ class Post {
|
||||
'repost_to': repostTo?.toJson(),
|
||||
'realm': realm?.toJson(),
|
||||
'published_at': publishedAt?.toIso8601String(),
|
||||
'pinned_at': pinnedAt?.toIso8601String(),
|
||||
'is_draft': isDraft,
|
||||
'author_id': authorId,
|
||||
'author': author.toJson(),
|
||||
|
Reference in New Issue
Block a user