mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-14 19:57:32 +01:00
Sort devices by alias, if available
This commit is contained in:
parent
39ddb732f7
commit
91c317fda2
@ -168,7 +168,7 @@ public class DeviceManager {
|
|||||||
@Override
|
@Override
|
||||||
public int compare(GBDevice lhs, GBDevice rhs) {
|
public int compare(GBDevice lhs, GBDevice rhs) {
|
||||||
if (rhs.getStateOrdinal() - lhs.getStateOrdinal() == 0) {
|
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());
|
return (rhs.getStateOrdinal() - lhs.getStateOrdinal());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user