From dd78834f9a9c02db2819b06203822bd82f5ac1b8 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 25 Jul 2020 15:53:02 +0200 Subject: [PATCH] Change sorting in tracks --- OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index 71defa1ce9..1003f00a61 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -965,9 +965,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment implement public int compare(File f1, File f2) { // here we could guess date from file name '2017-08-30 ...' - first part date if (f1.lastModified() == f2.lastModified()) { - return f1.getName().compareTo(f2.getName()); + return -f1.getName().compareTo(f2.getName()); } - return Long.compare(f1.lastModified(), f2.lastModified()); + return -Long.compare(f1.lastModified(), f2.lastModified()); } }); return listFiles;