;Don't apply sort spec when only sorting by date

If there is no sort spec given, then the postings are already sorted by
date, so there's no need to apply the default sort spec again.
This commit is contained in:
Michael Rees 2024-07-22 11:06:48 -05:00 committed by Simon Michael
parent 275c72b770
commit 25bcf3eebb

View File

@ -85,7 +85,7 @@ postingsReport rspec@ReportSpec{_rsReportOpts=ropts@ReportOpts{..}} j = items
summariseps = summarisePostingsByInterval whichdate mdepth showempty colspans
showempty = empty_ || average_
sortedps = sortPostings ropts sortspec_ displayps
sortedps = if sortspec_ /= defsortspec then sortPostings ropts sortspec_ displayps else displayps
-- Posting report items ready for display.
items =