aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Timeline.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-10 22:50:01 +0800
committerGitHub <noreply@github.com>2020-07-10 22:50:01 +0800
commit15e7467e6089537f0f3e2290f14a99b8a1fc2d76 (patch)
treea0ba363d1df5d1846f3a46bae4d0ffe7b72e1c89 /Timeline/Models/Timeline.cs
parent838f9377514b03404afa1d6b6e42e981174178b5 (diff)
parent3735e7fecd2c9eaf525cedb55912f918aad20779 (diff)
downloadtimeline-15e7467e6089537f0f3e2290f14a99b8a1fc2d76.tar.gz
timeline-15e7467e6089537f0f3e2290f14a99b8a1fc2d76.tar.bz2
timeline-15e7467e6089537f0f3e2290f14a99b8a1fc2d76.zip
Merge pull request #115 from crupest/post-deleted
Add timeline post deleted field.
Diffstat (limited to 'Timeline/Models/Timeline.cs')
-rw-r--r--Timeline/Models/Timeline.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Timeline/Models/Timeline.cs b/Timeline/Models/Timeline.cs
index 3701ed35..7afb1984 100644
--- a/Timeline/Models/Timeline.cs
+++ b/Timeline/Models/Timeline.cs
@@ -48,7 +48,7 @@ namespace Timeline.Models
public class TimelinePost
{
- public TimelinePost(long id, ITimelinePostContent content, DateTime time, User author, DateTime lastUpdated, string timelineName)
+ public TimelinePost(long id, ITimelinePostContent? content, DateTime time, User author, DateTime lastUpdated, string timelineName)
{
Id = id;
Content = content;
@@ -59,7 +59,8 @@ namespace Timeline.Models
}
public long Id { get; set; }
- public ITimelinePostContent Content { get; set; }
+ public ITimelinePostContent? Content { get; set; }
+ public bool Deleted => Content == null;
public DateTime Time { get; set; }
public User Author { get; set; }
public DateTime LastUpdated { get; set; }