From 91c317fda29a3e7d97c643e6f57194f957fd87d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Tue, 16 Nov 2021 20:58:57 +0000 Subject: [PATCH] Sort devices by alias, if available --- .../freeyourgadget/gadgetbridge/devices/DeviceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/DeviceManager.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/DeviceManager.java index 1bb07e40c..cf15ebe39 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/DeviceManager.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/DeviceManager.java @@ -168,7 +168,7 @@ public class DeviceManager { @Override public int compare(GBDevice lhs, GBDevice rhs) { if (rhs.getStateOrdinal() - lhs.getStateOrdinal() == 0) { - return Collator.getInstance().compare(lhs.getName(), rhs.getName()); + return Collator.getInstance().compare(lhs.getAliasOrName(), rhs.getAliasOrName()); } return (rhs.getStateOrdinal() - lhs.getStateOrdinal()); }