From b5d83046519394611c102fd28cc2bd20f0aadc2b Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sun, 12 Nov 2017 11:30:24 -0800 Subject: [PATCH] Lexically sort torrent and file lists by default --- src/ui/torrent_details.js | 2 +- src/ui/torrent_table.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/torrent_details.js b/src/ui/torrent_details.js index 2bc7f71..6f648c2 100644 --- a/src/ui/torrent_details.js +++ b/src/ui/torrent_details.js @@ -180,7 +180,7 @@ class Torrent extends Component { - {files.map(file => )} + {files.slice().sort((a, b) => a.path.localeCompare(b.path)).map(file => )}
diff --git a/src/ui/torrent_table.js b/src/ui/torrent_table.js index d22dfce..e62d5ff 100644 --- a/src/ui/torrent_table.js +++ b/src/ui/torrent_table.js @@ -33,7 +33,7 @@ class TorrentTable extends Component { - {Object.values(torrents).map(t => + {Object.values(torrents).slice().sort((a, b) => a.name.localeCompare(b.name)).map(t =>