diff options
author | crupest <crupest@outlook.com> | 2020-07-10 22:50:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 22:50:01 +0800 |
commit | 712cd6b079138e116a6de5d121b875094087e8a9 (patch) | |
tree | b9f6dfdd8aa15304514de696622cbf0c64ab22a7 /Timeline/Models/Timeline.cs | |
parent | e4ca28740d3ccdb64b61361a16bd104009682f6c (diff) | |
parent | 8036808ae8b7865d7d17b232c94b6a04ad197bb1 (diff) | |
download | timeline-712cd6b079138e116a6de5d121b875094087e8a9.tar.gz timeline-712cd6b079138e116a6de5d121b875094087e8a9.tar.bz2 timeline-712cd6b079138e116a6de5d121b875094087e8a9.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.cs | 5 |
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; }
|