Skip to content

Commit

Permalink
SUI-8: Fix sorting of feeds so the latest is on top
Browse files Browse the repository at this point in the history
  • Loading branch information
DJKnaeckebrot committed Jul 5, 2024
1 parent 6852bd1 commit ae446df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dbd-soft-ui",
"version": "1.7.26-beta.1",
"version": "1.7.27-beta.1",
"typings": "dbd-soft-ui.d.ts",
"author": {
"name": "iMidnight"
Expand Down
4 changes: 4 additions & 0 deletions views/partials/feeds.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class="card-body px-0 pt-0 pb-2">
<div class="table-responsive p-0">
<%
// Sort feeds by published date in descending order
feeds.sort((a, b) => b.published - a.published);
feeds.forEach((feed, index) => {
var delta = Math.abs(Date.now() - feed.published) / 1000;
Expand Down

0 comments on commit ae446df

Please sign in to comment.