From 7ea2e47c7fd816dde1c391dc79196915f287348b Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 31 Aug 2020 16:09:15 +0300 Subject: [PATCH] Cmskit comments order --- .../Shared/Components/Commenting/CommentingViewComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs index e8d6e73e9a..47944d71c8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; @@ -44,7 +45,7 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting EntityId = entityId, EntityType = entityType, LoginUrl = loginUrl, - Comments = result.Items + Comments = result.Items.OrderByDescending(i=> i.CreationTime).ToList() }; return View("~/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml", viewModel);