aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/TimelineService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-11-20 16:49:12 +0800
committercrupest <crupest@outlook.com>2019-11-20 16:49:12 +0800
commit33318b9244a82fee6d711aa15f853e1590ff13f7 (patch)
tree788b8acdf1141c757cb3226d3cd5f64594386b8f /Timeline/Services/TimelineService.cs
parentac3a053868787f682ccf6b31a0023082fd8c9f37 (diff)
downloadtimeline-33318b9244a82fee6d711aa15f853e1590ff13f7.tar.gz
timeline-33318b9244a82fee6d711aa15f853e1590ff13f7.tar.bz2
timeline-33318b9244a82fee6d711aa15f853e1590ff13f7.zip
Get posts should return posts ordered by time.
Diffstat (limited to 'Timeline/Services/TimelineService.cs')
-rw-r--r--Timeline/Services/TimelineService.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs
index 9ae9dc1c..affcff2e 100644
--- a/Timeline/Services/TimelineService.cs
+++ b/Timeline/Services/TimelineService.cs
@@ -348,7 +348,7 @@ namespace Timeline.Services
throw new ArgumentNullException(nameof(name));
var timelineId = await FindTimelineId(name);
- var postEntities = await Database.TimelinePosts.Where(p => p.TimelineId == timelineId && p.Content != null).ToListAsync();
+ var postEntities = await Database.TimelinePosts.OrderBy(p => p.Time).Where(p => p.TimelineId == timelineId && p.Content != null).ToListAsync();
var posts = new List<TimelinePostInfo>(await Task.WhenAll(postEntities.Select(async p => new TimelinePostInfo
{
Id = p.Id,