From 919e488ea0b8c15992fa7a5604937cbd804041ad Mon Sep 17 00:00:00 2001 From: Skalii Date: Tue, 30 Mar 2021 11:17:54 +0300 Subject: [PATCH] fix sort --- .../net/osmand/plus/liveupdates/LiveUpdatesFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index 23d963c4e5..9f91391af3 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -415,7 +415,11 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL public int compare(LocalIndexInfo o1, LocalIndexInfo o2) { CommonPreference preference1 = preferenceForLocalIndex(o1.getFileName(), getSettings()); CommonPreference preference2 = preferenceForLocalIndex(o2.getFileName(), getSettings()); - return preference2.get().compareTo(preference1.get()); + int prefSort = preference2.get().compareTo(preference1.get()); + if (prefSort != 0) { + return prefSort; + } + return o1.compareTo(o2); } }); notifyDataSetInvalidated();