1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-13 11:17:33 +01:00

Sort devices by alias, if available

This commit is contained in:
José Rebelo 2021-11-16 20:58:57 +00:00 committed by Gitea
parent 39ddb732f7
commit 91c317fda2

View File

@ -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());
}